Problem Plotting Fourier Transforms of Sine waves
Hello!
So let me start off by saying that I barely use MatLab. However, my professor assigned us a homework in which we have to find the fourier transform of a multiplication of sine waves and plot it. This is what I am trying..
>> syms x y
>> f=sin(2*x)*sin(5*x)
f =
sin(2*x)*sin(5*x)
>> g=fourier(f)
g =
2*transform::fourier(cos(x)*sin(x)^6, x, -w) – 20*transform::fourier(cos(x)^3*sin(x)^4, x, -w) + 10*transform::fourier(cos(x)^5*sin(x)^2, x, -w)
>> ezplot(fourier(g))
??? Error using ==> char
Cell elements must be character arrays.
Error in ==> ezplot at 160
fmsg = char(f);
Error in ==> sym.ezplot at 45
h = ezplot(char(f));
Why am I getting this error? How can I plot the Fourier transforms of these sine waves?
Any help would be appreciated!!Hello!
So let me start off by saying that I barely use MatLab. However, my professor assigned us a homework in which we have to find the fourier transform of a multiplication of sine waves and plot it. This is what I am trying..
>> syms x y
>> f=sin(2*x)*sin(5*x)
f =
sin(2*x)*sin(5*x)
>> g=fourier(f)
g =
2*transform::fourier(cos(x)*sin(x)^6, x, -w) – 20*transform::fourier(cos(x)^3*sin(x)^4, x, -w) + 10*transform::fourier(cos(x)^5*sin(x)^2, x, -w)
>> ezplot(fourier(g))
??? Error using ==> char
Cell elements must be character arrays.
Error in ==> ezplot at 160
fmsg = char(f);
Error in ==> sym.ezplot at 45
h = ezplot(char(f));
Why am I getting this error? How can I plot the Fourier transforms of these sine waves?
Any help would be appreciated!! Hello!
So let me start off by saying that I barely use MatLab. However, my professor assigned us a homework in which we have to find the fourier transform of a multiplication of sine waves and plot it. This is what I am trying..
>> syms x y
>> f=sin(2*x)*sin(5*x)
f =
sin(2*x)*sin(5*x)
>> g=fourier(f)
g =
2*transform::fourier(cos(x)*sin(x)^6, x, -w) – 20*transform::fourier(cos(x)^3*sin(x)^4, x, -w) + 10*transform::fourier(cos(x)^5*sin(x)^2, x, -w)
>> ezplot(fourier(g))
??? Error using ==> char
Cell elements must be character arrays.
Error in ==> ezplot at 160
fmsg = char(f);
Error in ==> sym.ezplot at 45
h = ezplot(char(f));
Why am I getting this error? How can I plot the Fourier transforms of these sine waves?
Any help would be appreciated!! fourier, transform, sine, wave, plotting, ezplot MATLAB Answers — New Questions