MATLAB Answers

How to remove the part of a signal less than xaxis =0 along with the peak

1 view (last 30 days)
Hello All,
Could you please help me with the MATLAB command to remove(trim) part of the signal highlighted in red colour in the image
MATLABquery.JPG

  0 Comments

Sign in to comment.

Accepted Answer

Vishnu Vardhan
Vishnu Vardhan on 21 Jun 2019
Hi Ashwini
you can use find function available in MATLAB
idx = find(x>=0);
plot(x(idx) ,y(idx)) %where x and y are the axis
Hope that helps!

  4 Comments

Show 1 older comment
Vishnu Vardhan
Vishnu Vardhan on 21 Jun 2019
Try idx = find(xaxisdataC>=0.1); depending upon where you want the plot to start.
Ashwini Amin
Ashwini Amin on 22 Jun 2019
Hello Vishnu ,
I have tried
idx = find(xaxisdataC>=0.1);
plot(xaxisdataC(idx) ,yaxisdataC(idx))
While doing so it is returning idx =[] (null )in my workspace.
Else could you please suggest a way to remove the part of signal from 0 upto the peak(present around value of 1000) in below image
MATLABquery2.JPG
Ashwini Amin
Ashwini Amin on 22 Jun 2019
Can i use any kind of filter or windowing techniques. If yes please help me with the code.

Sign in to comment.

More Answers (0)