- #1
hokhani
- 483
- 8
In the Matlab program below
U=[210; 100; 150]
ky= linspace(-.2,.2);
qx=sqrt(((150-U)/.2)^2-ky.^2)
I want to have qx as a matrix in which each row is corresponding to one value of U: the first row corresponds to 210, the second to 100 and ... How should I do this? (I want to avoid the "for loop" if possible).
U=[210; 100; 150]
ky= linspace(-.2,.2);
qx=sqrt(((150-U)/.2)^2-ky.^2)
I want to have qx as a matrix in which each row is corresponding to one value of U: the first row corresponds to 210, the second to 100 and ... How should I do this? (I want to avoid the "for loop" if possible).