how to plot a part of an signal using start and end point, that is stored in an different matrix? also how to calculate the local minima and maxima (ups and downs) within that array?

9 ビュー (過去 30 日間)
Let A be my original signal. I want to plot B using parts of the signal A, using location data from a DIFFERENT array ( say K) using a FOR loop. The location data are stored nicely in K (K[i] and K[i+1] marks the start and end of the data)
Let the circled pulse be nth and I want to calculate the fluctuations of nth plot? Can anyone help me with the code ?

回答 (2 件)

Azzi Abdelmalek
Azzi Abdelmalek 2016 年 5 月 14 日
i1=10
i2=30
yy=y(i1:i2)
plot(yy)

Walter Roberson
Walter Roberson 2016 年 5 月 14 日
  2 件のコメント
kedar Paul
kedar Paul 2016 年 5 月 14 日
I want to do this using for loop as I have multiple pulses
Walter Roberson
Walter Roberson 2016 年 5 月 14 日
for K = 1 : length(StartAt)
sta = StartAt(K);
sto = StopAt(K);
plot(t(sta:sto), YourData(sta:sto));
hold on
end
set(gca, 'xlimmode', 'auto', 'ylimmode', 'auto')

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

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by