Borrar filtros
Borrar filtros

can anyone help me to fix the issue

2 visualizaciones (últimos 30 días)
Prabha Kumaresan
Prabha Kumaresan el 5 de Abr. de 2018
Editada: Birdman el 5 de Abr. de 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.

Respuesta aceptada

Birdman
Birdman el 5 de Abr. de 2018
Editada: Birdman el 5 de Abr. de 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

Más respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by