|
From: | RT |
Subject: | invalid conversion from string to real scalar using fft and ifft function - how can I fix |
Date: | Sat, 23 Jan 2016 06:27:31 -0500 |
clear all,clf,tic
Fs=44100;
t=linspace(0,1,Fs);
sig_in=.5*sin(2*pi*1*t)+.2*cos(2*pi*3*t); %sin(2*pi*1*t);
y=ifft(sig_in);
freq_shift=1.3;
N=length(y);
mult = exp(-1i*2*pi/N*(0:N-1)*freq_shift);
shifted_sig=ifft((fft(y).*mult ),'symmetric'); %error here -invalid conversion from string to real scalar-
plot(t,sig_in,'-r',t,shifted_sig,'-b')
[Prev in Thread] | Current Thread | [Next in Thread] |