Severity: Warning
Message: fopen(/home/polpe/.phpsession/ci_session1d8d05766829538584452383b30095845fd53133): failed to open stream: No space left on device
Filename: drivers/Session_files_driver.php
Line Number: 159
Backtrace:
File: /home/polpe/public_html/application/controllers/Main.php
Line: 17
Function: library
File: /home/polpe/public_html/index.php
Line: 315
Function: require_once
Teljes Matlab script kiegészítő függvényekkel.
File: embedding.m Directory: 4_gyujtemegy/11_CCS/_2_nonlin-pannon/2018 Author: Peter Polcz (ppolcz@gmail.com)
Created on 2018. July 23.
syms t x1 x2 p1 p2 p3 real
x = [x1 ; x2];
p = [p1 ; p2 ; p3];
f_sym = [
-1 / (x1^2 + 2*x2 + 3)
1 / (x2 + x1)
];
g_sym = [
2
-1 / x2
];
h_sym = 1 / x2;
f(x)=(−1x21+2x2+31x1+x2)
g(x)=(2−1x2)
h(x)=1x2
p_def = [
1/x2
1/(x1+x2)
1/(x1^2 + 2*x2 + 3)
];
fp_sym = subs(f_sym, p_def, p);
gp_sym = subs(g_sym, p_def, p);
F_sym = [
fp_sym
subs(jacobian(p_def, x)*fp_sym, p_def, p)
];
G_sym = [
gp_sym
subs(jacobian(p_def, x)*gp_sym, p_def, p)
];
H_sym = subs(h_sym, p_def, p);
f(x,p)=(−p3p2−p21p2p22p3−p322p33x1−2p2p23)
g(x,p)=(2−p1p31p1p22−2p222p1p23−4p23x1)
h(x,p)=p1
u0 = 1;
x0 = [
0
-1.15
];
f_fh = matlabFunction(f_sym + u0*g_sym, 'vars', {t x});
figure('Position', [ 605 , 351 , 486 , 364 ], 'Color', [1 1 1])
[tt,xx] = ode45(f_fh, [0,10], x0);
plot(tt,xx(:,[1 2])), grid on;
title 'Simulation of the original system ($x_1$, $x_2$)' interpreter latex
z = [x;p];
z_def = subs(z,p,p_def);
z_fh = matlabFunction(z_def, 'vars', {x});
z0 = z_fh(x0);
F_fh = matlabFunction(F_sym + u0*G_sym, 'vars', {t z});
[tt,xx] = ode45(F_fh, [0,10], z0);
figure('Position', [ 529 , 351 , 1124 , 355 ], 'Color', [1 1 1])
subplot(121)
plot(tt,xx(:,[1 2])), grid on;
title 'Simulation of the embedding system ($x_1$, $x_2$)' interpreter latex
subplot(122)
plot(tt,xx(:,[3 4 5])), grid on;
title 'Simulation of the embedding system ($p_1$, $p_2$, $p_3$)' interpreter latex