converting vector to matrix
1 回表示 (過去 30 日間)
古いコメントを表示
Am beginner to this please tell me is there any function to convert vector to matrix.
vec=[0:4.80314960629921e-6:.00061]
which gives values from column 1 to column 128. i want to convert it to a matrix of 8 rows 16 columns.
0 件のコメント
採用された回答
その他の回答 (2 件)
David Sanchez
2013 年 5 月 23 日
vec=[0:4.80314960629921e-6:.00061];
my_matrix=zeros(8,16);
for k=1:8
my_matrix(k,:) = vec(k*16-15:k*16);
end
Brwa
2013 年 5 月 23 日
Both of David Sanchez and james tursa have done it well, but in the case of james tursa he miss type i think he should type as
reshape(vec,8,16)
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!