Hi all,
I apologize in advance but I'm a newbie and don't have much experience with matlab – anyway here's what I'm trying to do.
I want to build a 201×3 matrix where every row has the same numbers, and the numbers in the columns go from 0 to 20e-10 with steps of 0.1e-10.
The matrix should look something like this:
[0 0 00.1 0.1 0.1...20 20 20]
I tried doing this by nesting three "for" loops in the following way:
for i = 0:0.1e-10:20e-10 for j = 0:0.1e-10:20e-10 for k = 0:0.1e-10:20e-10 I = [i,j,k]; end endend
but instead of obtaining 201×1 vectors, i, j and k are just numbers (20e-10, to be precise).
I tried looking into other commands but I've been asked to do this specifically with nested for loops.
Sorry in advance if it's a silly question – and thanks to whoever takes the time to help!
Best Answer