Hi I’m trying to create the following matrix from two vectors
A=1:2B=4:7C=[1 41 51 61 72 42 5 2 62 7]
Using a for loop So far I have
A=1:2B=4:7For i=1:2 For j=1:4 C(i,j)= [A(i) B(j)] EndEnd
After that I get a dimensional error. Any suggestions?
Best Answer