Borrar filtros
Borrar filtros

how to store data in a matrix

13 visualizaciones (últimos 30 días)
nazila
nazila el 17 de Sept. de 2012
Respondida: mordant eagle el 16 de Abr. de 2017
Hi guys,
I have problem with storing data or points in a 'for loop' . when i am using 'for loop' at end i can display each point one by one but i cant collect them in a matrix, how can i store all points in a matrix? what is your idea? i appreciate any help!
Thanks.

Respuesta aceptada

Thomas
Thomas el 17 de Sept. de 2012
This video should help:
Eg
for ii = 1:50
for jj = 1:10
out(ii,jj)=rand(1);
end
end
out will be a matrix of 50*10
  1 comentario
nazila
nazila el 18 de Sept. de 2012
thanx alot :) it was helpful.

Iniciar sesión para comentar.

Más respuestas (1)

mordant eagle
mordant eagle el 16 de Abr. de 2017
Hi, what if I want to insert the rows like 1,2,3,...,50 and columns like 1,2,..,10. What shall I do ? for ii = 1:50 for jj = 1:10 out(ii,jj)=???; end
end

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by