construct a vector formed by arrays of different lengths
Mostrar comentarios más antiguos
Hi all
i want to built a vector using multiple arrays with different length. First of all with thi code
a=zeros(100000,sum(c));
for i=1:3
a(i,:)=b(i)*ones(1,c(i));
end
with this code i want to built a 3xsum( c) matrix. b has the same dimension of c but c has different lengths!! So when multiplied with b give different lengths of a. I want to join neatly the three vector a obtained; how can i do that?
Thank you for the help!!
Regards
3 comentarios
madhan ravi
el 2 de Sept. de 2020
What?
KSSV
el 2 de Sept. de 2020
what is c? in a there are 3 rows, but you initiated it with 100000 rows.
EldaEbrithil
el 2 de Sept. de 2020
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Data Type Conversion en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!