Assigning Null / Multi-Dimensional Matrix
古いコメントを表示
Hello,
I have a matrix with the dimensions of 4x2500 and I am generating this matrix in for loop. I want this matrix to be 4x1250. Without multi dimension I just write A(1:length(X)) = [] but I am stuck in multi dimension. This logic does not work in my operation.
when I say
A = [1:1:2500];
A (1:1250) = [];
it works and that is what i want to do.
but in multi dimension,
for i = 1:1:4
A(i,:) = ????????
end
Can someone help me? Thanks.
2 件のコメント
KSSV
2022 年 4 月 7 日
Question is not clear. What you want to do in the loop?
tinkyminky93
2022 年 4 月 7 日
採用された回答
その他の回答 (1 件)
A = repmat(1:5,4,1)
A(:,1:3) = []
1 件のコメント
tinkyminky93
2022 年 4 月 7 日
編集済み: tinkyminky93
2022 年 4 月 7 日
カテゴリ
ヘルプ センター および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!