我有一个信号,我想在MATLAB中使用picewise三次样条算法去除基线漂移.
d=load(file, '-mat');
t=1:length(a);
xq1=1:0.01:length(a);
p = pchip(t,a,xq1);
s = spline(t,a,xq1);
%
figure, hold on, plot(a, 'g'), plot(t,a,'o',xq1,p,'-',xq1,s,'-.')
legend('Sample Points','pchip','spline','Location','SouthEast')
Run Code Online (Sandbox Code Playgroud)
问题是如何在MATLAB中"使用peicewise立方样条插值去除基线漂移".
谢谢
我有一个简单数字的向量,如:
a=[1 2 3 4 5 6 7 8]
Run Code Online (Sandbox Code Playgroud)
我希望矢量的所有数字都在[25%75%]四分位数之间.但是,当我使用以下命令时:
quantile(a,[0.25 0.75])
Run Code Online (Sandbox Code Playgroud)
它只给我2个数字2和6(而不是3,4,5,6).你有什么解决方案我能做到吗?
感谢您的提前评论