How do I combine vectors to form a matrix?
1 回表示 (過去 30 日間)
古いコメントを表示
I am trying to run a loop which puts column 5 from every cell in this array shown below into a new matrix:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/162631/image.png)
This is my code at the moment:
combined = [6050,54]
for i=1:length(mydata)
combined(:,i) = mydata{i,1}(:,5);
end
This is the error I recieve:
Subscripted assignment dimension mismatch.
Error in MatlabCoursework (line 84) combined(:,i) = mydata{i,1}(:,5);
0 件のコメント
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!