I have array (vector) r =[2 4] and report matrix with size 50*2. I want put r in row 1 of report matrix.
When I run
with report(1)=r;
MATLAB returns this error:
??? In an assignment A(I) = B, the number of elements in B and I
must be the same.
How can I resolve this error?
You need to specify the columns as well. Otherwise
report(1)is a scalar,ris a vector, and you get an error.