フィルターのクリア

how to specify the particular column numbers of a matrix in for loop

1 回表示 (過去 30 日間)
AS
AS 2020 年 8 月 10 日
コメント済み: AS 2020 年 8 月 10 日
I have a matrix withy dimension 1801 by 88. I want to select the column number 70:75 in for loop for analysis. If I start with
for i=1:1801
for j=1:5
It is only taking the first five columns. But I want get five columns having column number 70:75.
How can I do this.

採用された回答

KSSV
KSSV 2020 年 8 月 10 日
for i = 1:1801
for j = 70:75
  7 件のコメント
KSSV
KSSV 2020 年 8 月 10 日
clc; clear all ;
load ampli_512.dat;
load freq_512.dat;
load phase_512.dat;
pos = 70:75 ;
Am = zeros(1801,6) ;
Ph = zeros(1801,6) ;
Fq = zeros(1801,6) ;
for i=1:1801
for j=1:6
Am(i,j)=ampli_512(i,pos(j));
Ph(i,j)=phase_512(i,pos(j));
Fq(i,j)=freq_512(i,pos(j));
end
end
AS
AS 2020 年 8 月 10 日
Thank you so much.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by