creating matrix by iteration 2
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Akmyrat
el 9 de Ag. de 2014
Comentada: Jan
el 10 de Ag. de 2014
Hi Everyone how are You? Can U help with this PLEASE: n=4 for i=1:n s=i if s == 3 for k =1:2 A(i,1) =s A(s+1,1)=s end else A(i,1) =s end end I want like this result: A=[1;2;3;3;4]. which if s == 3 it should be repeated 2 times in the matrix.
5 comentarios
Jan
el 10 de Ag. de 2014
@Akmyrat: This is a final project? And you solve it by asking a public forum? Impressing.
Respuesta aceptada
Más respuestas (1)
Ver también
Categorías
Más información sobre Creating and Concatenating Matrices 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!