Finding maximum and minimum values in arrays

March 26th, 2010 No Comments   Posted in Examples

Let’s write a function file range.m that calculates the difference between the maximum and minimum value in a vector. The file should return a reply. Open an edit window. Create a function file like the one below. Read More

Saving your Matlab sessions

March 26th, 2010 No Comments   Posted in Examples

Often one wants to save the data or variables to another occasion. Maybe one wants to save the whole Matlab session. This can be done. Commands are put in a m-file but data or variables are stored in a mat-file (binary file) which can be opened with Workspace Browser. First have a look in the workspace to find out how your varables look like. Then save these in a mat-file. Read More