- #1

cobraa_eyz

- 3

- 0

## Homework Statement

How i will write the code for fft

## Homework Equations

ACos(ωt+φ)

## 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