I want to copy values from one variable to another
Afficher commentaires plus anciens
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??
Réponse acceptée
Plus de réponses (1)
Azzi Abdelmalek
le 6 Mai 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)']
Catégories
En savoir plus sur Vehicle Dynamics Blockset dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!