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 ?
0 件のコメント
回答 (2 件)
Walter Roberson
2016 年 5 月 14 日
For the plotting, just
sta = StartAt(K);
sto = StopAt(K);
plot(t(sta:sto), YourData(sta:sto))
2 件のコメント
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 Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!