To find the average of a dataset in Matlab, you can use the mean function. Here is an example:
main.m121 chars9 lines
This will output the average of the data array, which in this case is 3. Note that mean can also be used on multi-dimensional arrays to calculate the mean in a specific dimension.
gistlibby LogSnag