Page 58 - Basics of MATLAB and Beyond
P. 58

11    Startup

                               Each time you start matlab it looks for a script m-file called startup.m
                               and, if it finds it, does it. Thus, you can use startup.m to do things like
                               set the search path, set command and figure window preferences (e.g.,
                               set all your figures to have a black background), etc.
                                  On PCs you should put the startup.m file in the directory called
                               C:\MATLAB\toolbox\local.   On UNIX workstations you should put
                               your startup file in a directory called matlab immediately below your
                               home directory: ~/matlab.

                               12    Using MATLAB on Different Platforms


                               A matlab format binary (.mat) file that is saved on one platform (say,
                               a PC or a Macintosh) can be transferred to a different platform (say, a
                               Unix or VMS box) and loaded into matlab running on that platform.
                               The mat-file contains information about the platform that saved the
                               data. matlab checks to see if the file was saved on a different platform,
                               and performs any necessary conversions automatically.
                                  matlab m-files are ordinary ASCII text, and are immediately trans-
                               portable between platforms. Different platforms may use different char-
                               acters to terminate lines of text (with CR and LF characters), but mat-
                               lab handles them all. However, the text editor you use must be able to
                               handle the end-of-line characters correctly.
                                  The program you use to transfer m-files or mat-files, for example,
                               FTPor mail, must do so without corrupting the data. For FTP, for
                               example, mat-files must be transmitted in binary mode and m-files must
                               be transmitted in ASCII mode.

                               13    Log Scales

                               When dealing with data that varies over several orders of magnitude
                               a plain linear plot sometimes fails to display the variation in the data.
                                                                      5
                               For example, consider the census estimates of Australia’s European
                               population at various times.  If this data is contained in the file
                               population.dat, we can load and plot it as follows:

                                 5
                                  Australian Bureau of Statistics Web Page, http://www.statistics.gov.au, and
                               Australians: A Historical Library, Australians: Historical Statistics, Fairfax, Syme
                               & Weldon Associates, 235 Jones Street, Broadway, New South Wales 2007,
                               Australia, 1987, pp. 25,26.









                               c   2000 by CRC Press LLC
   53   54   55   56   57   58   59   60   61   62   63