The find Function

May 9th, 2010 No Comments   Posted in Functions

The find function determines the indices of array elements that meet a given logical
condition. In its simplest form, find returns a column vector of indices. Transpose that
vector to obtain a row vector of indices. For example, Read More

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