d = 100;r = mod(a,b);for a = 2:1:d c = 0; for b = 1:1:a if r == 0 c = c+1; end end if c == 2 fprintf('value of a = %d',b,c,d) endend
MATLAB: How to solve matrix dimension must agree error in the following program.
matrix dimension must agree
Best Answer