フィルターのクリア

Appending of matrix columns

2 ビュー (過去 30 日間)
Shweta Saboo
Shweta Saboo 2021 年 4 月 1 日
回答済み: Jan 2021 年 4 月 1 日
I have a matrix of 10*5 dimensions.I want to access first column in the first iteration. In second iteration, starting two columns needs to be accessed and then so on . I want to do this using for loop. Any quick response will be appreciated.

回答 (1 件)

Jan
Jan 2021 年 4 月 1 日
This is a basic question. In is more efficient to learn the fundamental basics from Matlab's Onramp or from the Getting Started chapters of the documentation, than asking in the forum.
data = rand(10, 5);
for k = 1:5
submatrix = data(:, 1:k);
...
end

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by