Matlab - z(x:y) - vectoring is not working -
vectoring not working
z = 10:-1:1; x = 1:9; y = 2:10; z(x:y)
ans =
10 9
no vectorization index range?
if want pairs, you'll have use
>> z([x; y]) ans = 10 9 8 7 6 5 4 3 2 9 8 7 6 5 4 3 2 1
resp.
>> z([x; y].') ans = 10 9 9 8 8 7 7 6 6 5 5 4 4 3 3 2 2 1
Comments
Post a Comment