Plotting arrays of same length
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Torsten
2022 年 5 月 26 日
y_picchi = interp1(time,y,tempo_picchi);
plot(tempo_picchi,y_picchi)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!