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 views (last 30 days)
Show older comments
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 Comments
Answers (2)
Walter Roberson
on 14 May 2016
For the plotting, just
sta = StartAt(K);
sto = StopAt(K);
plot(t(sta:sto), YourData(sta:sto))
2 Comments
Walter Roberson
on 14 May 2016
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')
See Also
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!