MATLAB: How do you calculate percentage change between sequential elements in array

divisionhyperbolic functionsequential change

I have a 14400×11 array of values from the output of a hyperbolic function and want to calculate the sequential percentage change from, for example, the first element in the first row and column a(i,j) to the second element in the second row and first column a(i+1,j). How can I do this?

Best Answer

X=rand(3,4)
percent_change=diff(X)./X(1:end-1,:)
Related Question