Filter löschen
Filter löschen

can anyone help me to fix the issue

1 Ansicht (letzte 30 Tage)
Prabha Kumaresan
Prabha Kumaresan am 5 Apr. 2018
Bearbeitet: Birdman am 5 Apr. 2018
code:
v=[1 2 3 4];
v=[5 6 7 8 9];
v=[10 11 12 13 14 15];
for v = [1 2 3 4]
disp(v)
end
In the above code could anyone help me how to display v=[1 2 3 4];
v=[5 6 7 8 9];
v=[10 11 12 13 14 15]; together using the same for loop.

Akzeptierte Antwort

Birdman
Birdman am 5 Apr. 2018
Bearbeitet: Birdman am 5 Apr. 2018
v={[1 2 3 4];[5 6 7 8 9];[10 11 12 13 14 15]};
for i=1:size(v,1)
v{i,:}
end

Weitere Antworten (0)

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by