Hi, I've been having a problem filling a matrix. I need to fill it using a "for" loop, but the equations for each element is different. I hope the example can explain better what I pretend to achieve. Hope someone can help. Thanks.
for i=1:5 k(i,1,1)=2*x(i); k(i,1,2)=9*y(i); k(i,2,1)=-2*x(i); k(i,2,2)=-2*y(i);end
Best Answer