To calculate the mean/average of the array a in MATLAB, you can use the mean function.
main.m93 chars4 lines
This will output the following value:
main.m22 chars2 lines
The variable avg_a contains the mean value of the array a.
gistlibby LogSnag