在MATLAB中将Sinc插值用于复杂矢量

时间:2019-01-14 10:14:28

标签: matlab interpolation complex-numbers

我正在对复杂的正弦曲线使用正弦插值。对于实部来说,它工作正常,但是虚构的部分似乎倒置了。

t1=0:pi/10:2*pi;       % sample points
s1=exp(1i*t1);         % sampled signal
figure(1),subplot 211, plot(t1,real(s1),'o');
subplot 212, plot(t1,imag(s1),'o');

t2=linspace(0,2*pi,100);   % interpolation points, a total of 100.

[T2,T1]=ndgrid(t2,t1);

s2=sinc((T2-T1)*10/pi)*s1'; 

figure(1),subplot 211, hold on, plot(t2,real(s2),'.');
subplot 212, hold on, plot(t2,imag(s2),'.');

Blue circle: sample values; Red dots: interpolated values

1 个答案:

答案 0 :(得分:2)

问题是您实际上需要s1'conjugate transpose)时正在使用s1.'transpose)。

这是一个常见错误。更多信息here

相关问题