Convert a function into a matrix
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I want (h(t)) to be in form of matrix, how to do it?
Parameters= {'R0','R1','C1','Qr','bo','b1','SOC','Vrc','Voc'};
R0=0.000605797;
Qr=147964.8608;
R1=0.000856205;
C1=0.049823238;
% X=[SOC;Vrc];
A=[0 0;0 -1/R1*C1];
B=[1/Qr;1/C1];
C=[1 1];
D= R0;
% u=Il;
sys= ss(A,B,C,D);
tfsys = tf(sys);
n = tfsys.Numerator;
d = tfsys.Denominator;
syms s t
H(s) = poly2sym(n,s) / poly2sym(d,s)
H = vpa(H, 5);
h(t) = ilaplace(H)
h = vpa(h, 5)
figure
fplot(h)
grid
axis([0 0.1 0 20])
0 Commenti
Risposte (1)
Chunru
il 24 Giu 2022
Parameters= {'R0','R1','C1','Qr','bo','b1','SOC','Vrc','Voc'};
R0=0.000605797;
Qr=147964.8608;
R1=0.000856205;
C1=0.049823238;
% X=[SOC;Vrc];
A=[0 0;0 -1/R1*C1];
B=[1/Qr;1/C1];
C=[1 1];
D= R0;
% u=Il;
sys= ss(A,B,C,D);
tfsys = tf(sys);
n = tfsys.Numerator;
d = tfsys.Denominator;
syms s t
H(s) = poly2sym(n,s) / poly2sym(d,s)
H = vpa(H, 5);
h(t) = ilaplace(H)
% h = vpa(h, 5)
figure
fplot(h)
grid
axis([0 0.1 0 20])
t1=linspace(0, 0.1, 21)
h1 = double(h(t1))
7 Commenti
Vedere anche
Categorie
Scopri di più su Numbers and Precision in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!