I am trying to write a script for this equation:
X(Ts n) = Summation k=-N to N of Ak*e^(j*k*Wo*Ts*N)
the Ak also called C in my code is a separate matrix I have already generated for the function.
Below is the code I have:
function [ output_args ] = fsynt(C, T, Ts)
if rem(T,Ts) ~= 0;
disp('T/Ts not an integer');
B = conj(C(11:-1:2));
CC = horzcat(B,C)
for k = -10:1:10
I am a bit lost on what to do. When I run with one period of a square wave I get a lot of matrices for F when I do not multiply it with CC in that same nested four loop, and I believe I need all of the matrices as one?
Any help is much appreciated, Thank you.