User`s manual

5
Calling Java from
MATLAB
Using Java from MATLAB: An Overview . . . . . . . 5-3
Bringing Java Classes into MATLAB . . . . . . . . . 5-5
Creating and Using Java Objects . . . . . . . . . . 5-10
Invoking Methods on Java Objects . . . . . . . . . . 5-19
Working with Java Arrays . . . . . . . . . . . . . 5-29
Passing Data to a Java Method . . . . . . . . . . . 5-46
Handling Data Returned from a Java Method . . . . . 5-56
Introduction to Programming Examples . . . . . . . 5-62
Example – Reading a URL . . . . . . . . . . . . . . 5-63
Example – Finding an Internet Protocol Address . . . 5-66
Example – Communicating Through a Serial Port . . . 5-68
Example – Creating and Using a Phone Book . . . . . 5-73