I wrote this code but I didn't get the correct answer from it. i don't know where the problem is. thank for help
clc clear all m = input( 'please enter the number of LINES:'); n = input( 'please enter the number of ROWS:'); y = zeros(m,n); G = zeros(m,n); x = rand(m,n); y= 0.2*x+32; s(1)=y(1); s(m*n)=sum(sum(y)); for i= 3: m*n s(i-1)= s(i-2) + y(i-1); end G = zeros(m,n); for i= 1:m*n G(i) = s(i)/(i) ; end disp(G) hist(G)
Best Answer