Plotting arrays of same length
1 view (last 30 days)
Show older comments
Hello to Everyone! I have a little problem:
I wanto to plot a graph of which the vector of time has been modified from the Original Signal, and i want to plot it on the Original Signal. The vector of time that is modified is tempo_picchi (1x134), and the original signal has these dimensions : time(1x4050),y(1x4050); I want to annote the y(orginial signal) in tempo_picchi;
Thank you!
The Code is this :
soglia = find(y(locs_zero)>= 0.03);
locs_zero_1 = locs_zero([soglia, soglia-1]);
tempi_1 = tempo(locs_zero_1);
tempo_picchi = tempi_1(:,1);
tempo_onset = tempi_1(:,2);
delta_tempo = 0.3;
index_picchi = find(diff(tempo_picchi)<delta_tempo);
index_onset = find(diff(tempo_onset)<delta_tempo);
tempo_picchi(index_picchi)= []; I cancel the values in this position.
tempo_onset(index_onset)=[];
0 Comments
Answers (1)
Torsten
on 26 May 2022
y_picchi = interp1(time,y,tempo_picchi);
plot(tempo_picchi,y_picchi)
0 Comments
See Also
Categories
Find more on Logical 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!