concatenate matrices into one
情報
この質問は閉じられています。 編集または回答するには再度開いてください。
古いコメントを表示
Hello everyone! I have 180 matrices, 19*330, the are stored as mat files (B1C1,B1C2.....B1C15,B2C1,...,B2C15,...,B12C1,....,B12C15). I want to concatenate them into one matrix 180*19 by 330. does any one how can I do that?
3 件のコメント
Azzi Abdelmalek
2016 年 7 月 19 日
How your matrices are stored?
Sophi gra
2016 年 7 月 19 日
編集済み: Azzi Abdelmalek
2016 年 7 月 19 日
Azzi Abdelmalek
2016 年 7 月 19 日
Please edit your question, don't let people guess what you are asking for!
回答 (1 件)
Azzi Abdelmalek
2016 年 7 月 19 日
編集済み: Azzi Abdelmalek
2016 年 7 月 19 日
M=[]
for ii=1:15
for jj=1:12
name=sprintf('B%dC%d',ii,jj)
s=load(name)
n=fieldnames(s)
M=[M;s.n]
end
end
8 件のコメント
Sophi gra
2016 年 7 月 19 日
Azzi Abdelmalek
2016 年 7 月 19 日
Look at edited answer
Sophi gra
2016 年 7 月 19 日
Azzi Abdelmalek
2016 年 7 月 19 日
編集済み: Azzi Abdelmalek
2016 年 7 月 19 日
M=zeros(19,330,180);
k=00
for ii=1:15
for jj=1:12
k=k+1
name=sprintf('B%dC%d',ii,jj)
s=load(name)
n=fieldnames(s)
M(:,:,k)=s.n
end
end
Sophi gra
2016 年 7 月 20 日
Azzi Abdelmalek
2016 年 7 月 20 日
Maybe you need to specify the location of your files
Sophi gra
2016 年 7 月 20 日
Sophi gra
2016 年 7 月 20 日
この質問は閉じられています。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!