Creating a matrix by some other matrices
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Moe
el 12 de Mayo de 2014
Comentada: Moe
el 12 de Mayo de 2014
Suppos I have:
a = [3;3;5;8;2;1;8;1;5];
b = 2
I want matrix c to be:
c = [3 2;3 2;5 2;8 2;2 2;1 2;8 2;1 2;5 2]
second column of matrix c is just repeated b
0 comentarios
Respuesta aceptada
Más respuestas (2)
Azzi Abdelmalek
el 12 de Mayo de 2014
Editada: Azzi Abdelmalek
el 12 de Mayo de 2014
[a 2*ones(size(a))]
Ver también
Categorías
Más información sobre Multidimensional Arrays 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!