フィルターのクリア

Plots aren't showing the whole array!

3 ビュー (過去 30 日間)
Johannes Graf
Johannes Graf 2023 年 10 月 16 日
コメント済み: Mathieu NOE 2023 年 10 月 19 日
Hi,
I received data which I have to evaluate. The data is "nearly" the same as a square wave signal. My job as simple as it appears, is to locate those points in the array where either the values suddenly rise or suddenly drop. I did this by analysing the deriviation of the data according to x. I let that deriviation plot by Matlab, but it's only showing me those peaks with positive gradient. I investigatet my data and recognized that the x-values of negative gradients are single values surrounded by those of positive gradients. Or let me say it differently: 397 Eeements of my deriviation vector are positive and only three are negative.
What could be the problem, inducing my plot to not show those points?
  3 件のコメント
Johannes Graf
Johannes Graf 2023 年 10 月 16 日
編集済み: Johannes Graf 2023 年 10 月 16 日
Thanks for answering, right now in the moment I was able to solve it but I will state my process. Maybe it's helpfull for others :/
I deriviated numerally by
for i=1:(length(phi_K)-1)
d_phi_K(i)=(c_z_ges(i+1)-c_z_ges(i))/(phi_K(i+1)-phi_K(i));
end
then middled phi_K by
for i=1:(length(phi_K)-1)
phi_K_opt(i)=sum([phi_K(i) phi_K(i+1)])/2;
end
Than averaged the whole of d_phi_K and looked for the values which are greater in amount than the average. Until now the code was working as fine as I expected it. But when I plotted it the problem of my question appeared.
I'd overseen, that the absolute value of the negative gradients is much smaller than the maximum of my deriviation vector. So the only thing I had to do in the end was, to change the scaling of my plot to ylim([min(d_phi_K) -min(d_phi_K)]).
Mathieu NOE
Mathieu NOE 2023 年 10 月 19 日
can you share some data and a working code ?

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeMultirate Signal Processing についてさらに検索

タグ

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by