Need help with syntax and how to use sigma in matlab
Ältere Kommentare anzeigen
I don't know how to type Uan from my code below in matlab. It says ''Matrix dimensions must agree.''
This is what Im trying to type:

clear
close all
Z1=500
Z2=50
Z3=500
u=1
tau1=(2*Z2)/(Z1+Z2);
tau2=(2*Z1)/(Z1+Z2);
tau3=(2*Z3)/(Z3+Z2);
p1=(Z2-Z1)/(Z2+Z1);
p2=(Z1-Z2)/(Z1+Z2);
p3=(Z3-Z2)/(Z3+Z2);
T=2*10^-6
t=0:50*T/200:50*T
%I am stuck on Uan and F1
n=2:3:25
ua1=tau1*u.*(t>=0)
Uan=(tau1.*tau2.*(p3^n-1).*(p2^n-2).*u).*(t>=(n-1)*2*T)
F1=symsum(Uan,n,2,25)
figure(1)
plot(t,F1, 'DisplayName', 'F1')
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Mathematics finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!