Generating a matrix
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I want to generate a matrix as
first column must consist values of =.31,.33,.35,.37,.39..........
2nd column=.32,.34,.36,.38,.41.............
3rd column=.41,.43,.45,.47,.49,.51...............
4th column=.42,.44,.46,.48,50,,,,,,,,,,,
5th column=0.51,0.53,0.55,.57,.59,.61...........
6th column =0.52,0.54,0.56,.85,.60
with 100 rows and 6 columns,please help
0 comentarios
Respuesta aceptada
Andrei Bobrov
el 13 de Feb. de 2012
out = ...
bsxfun(@plus,reshape(bsxfun(@plus,.31:.1:.51,[0;.01]),1,[]),[0; .02*(1:99)']);
OR
out = reshape(permute(reshape(...
bsxfun(@plus,.31:.1:.51,[0;.01*(1:199)']).',3,2,[]),[3 2 1]),[],6);
0 comentarios
Más respuestas (0)
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!