Assuming A is ECG data in this form 1000 X 243 double, how do I make MATLAB read or perform a task on the 1st column alone, then the 2nd column ...... like that till the last being 1000th column.
I am new to MATLAB and I have tried to figure this out but couldnt.
Please any help...

 採用された回答

Walter Roberson
Walter Roberson 2020 年 2 月 13 日

0 投票

subplot(1,3,1)
plot(A(:,1));
subplot(1,3,2)
plot(A(:,2));
subplot(1,3,3)
plot(A(:,3));
However, I suspect that what you really want is something that turns out to be the same as
plot(A)
This will plot the first column of A as one line, and in the _same_ plot but a different color will plot the second column, and in the same plot but a third color will plot the third column.

3 件のコメント

Ola Ola
Ola Ola 2020 年 2 月 13 日
編集済み: Ola Ola 2020 年 2 月 13 日
Please I have given a better description of my problem now.
Walter Roberson
Walter Roberson 2020 年 2 月 13 日
for colnum = 1 : size(A,2)
this_data = A(:, column);
process this_data
end
However with 1000 x 243 this would execute 243 times, with the last one being column 243, whereas you asked for the last one to be column 1000. You do not have 1000 columns. If you want to work row by row, then
for rownum = 1 : size(A,1)
this_data = A(rownum, :);
process this_data
end
Ola Ola
Ola Ola 2020 年 2 月 15 日
Thanks for the answer

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeGet Started with Signal Processing Toolbox についてさらに検索

質問済み:

2020 年 2 月 13 日

コメント済み:

2020 年 2 月 15 日

Community Treasure Hunt

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

Start Hunting!

Translated by