Attached are the plots of a i get from a csv file imported to MATLAB. I want to declutter the plot (remove the noise captured by measuring instrument) zoom on in the data.

2 views (last 30 days)
Desired result capture.png

Accepted Answer

Kevin Holly
Kevin Holly on 23 Feb 2022
open('untitled2.fig')
xlim([-0.5 2.5]) % changed domain min and max to zoom in.
h=gca; % obtained handle of the current axes
x = h.Children.XData; % extracted xdata from figure
y = h.Children.YData; % extracted ydata from figure
y=lowpass(y,10,1000); % Low pass filter with cut off at 10Hz, assuming sample rate of 1000 Hz
plot(x,y)
xlim([-0.5 2.5]) % changed domain min and max to zoom in.
open('untitled.fig')
h=gca; % obtained handle of the current axes
x = h.Children.XData; % extracted xdata from figure
y = h.Children.YData; % extracted ydata from figure
y=lowpass(y,10,1000); % Low pass filter with cut off at 10Hz, assuming sample rate of 1000 Hz
figure
plot(x,y)
xlim([-20 20])
  6 Comments

Sign in to comment.

More Answers (0)

Tags

Products

Community Treasure Hunt

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

Start Hunting!