unknown numbers of input
2 ビュー (過去 30 日間)
古いコメントを表示
let say i have M X N matrix, and i want to split it based on its number of rows, example below is 3X5 matrix, so how can i get M variables (x,y,z) without knowing the number of M?
Matrix A became arrays :
1 1 1 1 1 x = 1 1 1 1 1
2 2 2 2 2 => y = 2 2 2 2 2
3 3 3 3 3 z = 3 3 3 3 3
0 件のコメント
回答 (2 件)
Thorsten
2015 年 10 月 15 日
Creating dynamically named variables should be avoided. Just use
A(i,:)
to get you desired vectors.
1 件のコメント
参考
カテゴリ
Help Center および File Exchange で Matrices and Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!