Generating a matrix

9 次查看(过去 30 天)
kash
kash 2012-2-13
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

采纳的回答

Andrei Bobrov
Andrei Bobrov 2012-2-13
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 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by