MATLAB: Simple calculations

derivativeMATLABvectors

I would like to find dn1/dn2 in matlab and I have two vectors n1 and n2.
How can I find dn1/dn2 the simplest way? Are there any inbuilt functions for these kind of calculations?

Best Answer

Perhaps you're looking for
res = diff(n1)./diff(n2); %?