How to select columns from data matrix using "for" loop?

9 ビュー (過去 30 日間)
Ismail Qeshta
Ismail Qeshta 2018 年 2 月 14 日
コメント済み: Birdman 2018 年 2 月 14 日
Hi,
I would like to select columns from a data matrix and use them to interpolate data from another file. For example, first column is selected and interpolated from another file, and printed, then the second column, and so on. I know the interpolation code, but I need the selection of column and printing the interpolated data codes.
I would be grateful if someone can help me in this.
Thank you. Regards, Ismail

採用された回答

Birdman
Birdman 2018 年 2 月 14 日
One approach:
for i=1:size(A,2)%number of columns
b=A(:,i);%ith column is assigned to b variable at every step
interp(b,..);%you can use it in your function
end
  42 件のコメント
Ismail Qeshta
Ismail Qeshta 2018 年 2 月 14 日
Yes. I was thinking about that. Thank you very much again Birdman. I really appreciate your time and effort.
Birdman
Birdman 2018 年 2 月 14 日
You are welcome.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by