(adsbygoogle = window.adsbygoogle || []).push({}); 1. The problem statement, all variables and given/known data

How i will write the code for fft

2. Relevant equations

ACos(ωt+φ)

3. The attempt at a solution

n = 100;

n = 0:n;

nodd = 2*n + 1;

T=n*pi/2w

w=2*pi*1.93*10^14;

phi= 0;

A=-6:6;

X= A*cos(w*T+pi)

%Here it generates error

" ??? Error using ==> mtimes Inner matrix dimensions must agree."

Y=fft(X)

Plot(A,T)

When ever i use two variable values it gives me the same error, how can i fix that.

Regards

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# How i will write the code for fft

**Physics Forums | Science Articles, Homework Help, Discussion**