how do you separate time data from signal data, plot the signal, followed by the removal of the trend without using the inbuilt ‘detrend’ function
조회 수: 1 (최근 30일)
이전 댓글 표시
%%. Load a signal_txt in Matlab using the importdata function. I then need to separate the time information from the signal information and plot the signal. I finally need to remove the trend without using the ‘detrend’ function.
%Task 1a
%%Heres my script code
t = signal1(:,1); %Load time data into variable t
a = signal1(:,3); %Load amplitude data into variable a
plot(t,a); %Plot time against amplitude
%%Heres my test code
x = 0:pi/100:2*pi;
y = sin(x);
plot(x,y)
댓글 수: 0
채택된 답변
Hiro Yoshino
2020년 2월 19일
well .... how about removing the mean to begin with?
plot(t, a - mean(a));
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!