Here is my code:
% Plot amplitude vs frequencey
n = 0:15;
f = f0*n;
A = abs((8*10) ./ (pi^2) .* (1./n) .* cos(n.*w.*t));
xlabel('Frequency in Hz')
ylabel('Amplitude in Volts')
title('Signal Amplitude vs frequency ')
I keep on getting the error "Matrix dimesons must agree."
f0 is the funamental frequencey defined earlier in the code, it is 1e3 (aka 1kHZ).
t has also been predefined as t = linspace(0,3*T,1000);
T is the peroid, 1/f0 = 300ms.