MATLAB: [Formula][User Friendly]

Hey guys and girls,
I am facing a very frustrating problem whereby I have developed a set of new formula that should fits to identify the min and max of my graph.
The set of formula is as below:
Value = Min(y)n (min (y)n-min(y)n-1) X (Zn constant)
(Zn Zn-1)
Is it possible to allow the system to read the previous matric on its own?

Best Answer

I don't know what y sub n and z sub n are. Normally I'd think they may be an array element like y(n) and z(n) - the n'th element of vectors y and z. However taking the min of a single array element doesn't make much sense so now I'm going to assume yn is a vector and zn is a vector, and znm1 is another vector, like (possibly) they're the n'th and (n-1)st columns of a 2D array or something. So in that case, the equation would be
Value = min(yn) (min(yn)-min(ynm1)) .* (Zn 1.6) ./ (Zn-Znm1);
Or, breaking it down to simplify it:
term1 = min(yn)-min(ynm1);
numerator = Zn 1.6;
denominator = Zn-Znm1;
Value = min(yn) term1 .* numerator ./ denominator;
Note, all vectors yn, ynm1, Zn, and Znm1 must be the same size and shape, like all 1-by-100 or whatever.