I want to copy values from one variable to another
Show older comments
j=1;
V=[0 1 2 4 5 6 7 9 10 11 52 10 2 0 60 4 0 407 0 7 70];
for i=1:1:15
v=V(:,j:(j+3));
I want v=[0 1 2] in first iteration n so on.But values are not coming in proper order. Any other method for doing this??
Accepted Answer
More Answers (1)
Azzi Abdelmalek
on 6 May 2016
V=[0 1 2 4 5 6 7 9 10 11 52 10 2 0 60 4 0 407 0 7 70];
M=[V(1:end-2)' V(2:end-1)' V(3:end)']
Categories
Find more on Vehicle Dynamics Blockset in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!