I'm currently working on an assignment where we want to plot an output function.
Since our input signal( v(t) )is in the Time domain and our transfer function ( H(s) ) is in the S domain. we want to bring our input signal to the S domain so we can simply use multiplication and then bring it back to the time domain to plot.
The error I'm getting is: Error using plot Data must be numeric, datetime, duration or an array convertible to double.
syms s C R L T n
C = (36)10^(-6); % Our given values for capacitance, inductance and resistance
L = 0.18;
R = 100;
T = 1/50; % Period
H = 1/(CRs + CL*s^2 + 1); %Transfer function
y = 3/2; %c_0
for n = -5:1:5
c_k = (((-1)^n)/(pi(2n+1)))exp(1i(2n+1)100pit);
y = y + c_k;
end
V = laplace(y);
Vc = V * H;
vc = ilaplace(Vc);
vpa(vc);
plot(t,vc);```