extract the same coloumn from multiple mtrix
古いコメントを表示
Hi! I'm new here i want to ask if there is a solution in Matlab to extract the same column number from multiple matrix. I have 640 matrix and I want to extract from each mtrix the column indexed 70 and save this column in one new matrix .I thank you in advance for your help
採用された回答
その他の回答 (2 件)
Razvan
2012 年 10 月 19 日
To extract column 70 from matrix M you do
C = M(:,70);
To add this column to another matrix (M2) you do
M2 = [M2, C];
3 件のコメント
sami
2012 年 10 月 19 日
Azzi Abdelmalek
2012 年 10 月 19 日
編集済み: Azzi Abdelmalek
2012 年 10 月 19 日
how are named your 640 matrix? , or do you import them each iteration
sami
2012 年 10 月 19 日
Azzi Abdelmalek
2012 年 10 月 19 日
編集済み: Azzi Abdelmalek
2012 年 10 月 19 日
M=[]
for k=1:8
s=['M=[M' sprintf([',device%d_%d(:,70)'],[k*ones(1,80);(1:80)]) ']']
eval(s)
end
カテゴリ
ヘルプ センター および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!