User`s manual

vi Contents
Example – Communicating Through a Serial Port . . . . . . . 5-68
Description of Serial Example . . . . . . . . . . . . . . . . . . . . . . . . . . 5-69
Running the serialexample Program . . . . . . . . . . . . . . . . . . . . 5-72
Example – Creating and Using a Phone Book . . . . . . . . . . . 5-73
Description of Function phonebook . . . . . . . . . . . . . . . . . . . . . . 5-74
Description of Function pb_lookup . . . . . . . . . . . . . . . . . . . . . . 5-78
Description of Function pb_add . . . . . . . . . . . . . . . . . . . . . . . . . 5-79
Description of Function pb_remove . . . . . . . . . . . . . . . . . . . . . . 5-80
Description of Function pb_change . . . . . . . . . . . . . . . . . . . . . . 5-80
Description of Function pb_listall . . . . . . . . . . . . . . . . . . . . . . . 5-82
Description of Function pb_display . . . . . . . . . . . . . . . . . . . . . . 5-82
Description of Function pb_keyfilter . . . . . . . . . . . . . . . . . . . . . 5-83
Running the phonebook Program . . . . . . . . . . . . . . . . . . . . . . . 5-83
6
Importing and Exporting Data
Using MAT-Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3
Importing Data to MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3
Exporting Data from MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . 6-4
Exchanging Data Files Between Platforms . . . . . . . . . . . . . . . . 6-5
Reading and Writing MAT-Files . . . . . . . . . . . . . . . . . . . . . . . . . 6-6
Finding Associated Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-8
Examples of MAT-Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-11
Creating a MAT-File in C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-11
Reading a MAT-File in C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-16
Creating a MAT-File in Fortran . . . . . . . . . . . . . . . . . . . . . . . . 6-21
Reading a MAT-File in Fortran . . . . . . . . . . . . . . . . . . . . . . . . . 6-24
Compiling and Linking MAT-File Programs . . . . . . . . . . . . 6-28
Masking Floating Point Exceptions . . . . . . . . . . . . . . . . . . . . . 6-28
Compiling and Linking on UNIX . . . . . . . . . . . . . . . . . . . . . . . 6-29
Compiling and Linking on Windows . . . . . . . . . . . . . . . . . . . . . 6-30