Plot of time-trajectories for the synchronization between two systems
Show older comments
I want to ask about plotting the synchronization between two systems b using matlab
here is the code in maple
with(plots);
sys := diff(x(t), t) = a*(-x(t) + y(t)), diff(y(t), t) = b*x(t) - k*x(t)*z(t), diff(z(t), t) = -c*z(t) + h*x(t)^2, diff(X(t), t) = a*(-X(t) + Y(t)) - a*Y(t) + 2*alpha1*a*x(t)*y(t) - alpha1*a*x(t)^2 + a*alpha2*y(t), diff(Y(t), t) = ((b*X(t) - k*X(t)*Z(t)) - b*X(t)) + k*X(t)*Z(t) + 2*beta1*b*x(t)*y(t) - 2*beta1*k*x(t)*y(t)*z(t) + beta2*b*x(t) - beta2*k*x(t)*z(t) - 15*(Y(t) - beta1*y(t)^2 - beta2*y(t)), diff(Z(t), t) = ((-c*Z(t) + h*X(t)^2) - h*X(t)^2) + 2*delta1*h*x(t)^2*z(t) - delta1*c*z(t)^2 + delta2*h*x(t)^2;
NULL;
fcns := {X(t), Y(t), Z(t), x(t), y(t), z(t)};
p := dsolve({sys, X(0) = 20, Y(0) = -3, Z(0) = 16, x(0) = 7, y(0) = -7, z(0) = 5}, fcns, type = numeric);
odeplot(p, [t, X(t) - (alpha1*x(t) + alpha2)*x(t)], 0 .. 6, labels = ['t', 'ex'], color = blue, numpoints = 100, thickness = 2);
p := dsolve({sys, X(0) = 20, Y(0) = -3, Z(0) = 16, x(0) = 7, y(0) = -7, z(0) = 5}, fcns, type = numeric);
odeplot(p, [t, Y(t) - (beta1*y(t) + beta2)*y(t)], 0 .. 8, labels = ['t', 'ey'], color = olive, numpoints = 0.1, thickness = 2);
p := dsolve({sys, X(0) = 20, Y(0) = -3, Z(0) = 16, x(0) = 7, y(0) = -7, z(0) = 5}, fcns, type = numeric);
odeplot(p, [t, Z(t) - (delta1*z(t) + delta2)*z(t)], 0 .. 8, labels = ['t', 'ez'], color = red, numpoints = 0.100, thickness = 2);
p := dsolve({sys, X(0) = 20, Y(0) = -3, Z(0) = 16, x(0) = 7, y(0) = -7, z(0) = 5}, fcns, type = numeric);
odeplot(p, [[t, X(t) - alpha1*x(t)^2 - alpha2*x(t)], [t, Y(t) - (beta1*y(t) + beta2)*y(t)], [t, Z(t) - (delta1*z(t) + delta2)*z(t)]], 0 .. 7, numpoints = 100, color = [blue, olive, red], legend = [e__x, e__y, e__z], thickness = 2);
3 Comments
Walter Roberson
on 27 Feb 2025
That Maple code generates the following:
Warning, The use of global variables in numerical ODE problems is deprecated, and will be removed in a future release. Use the 'parameters' argument instead (see ?dsolve,numeric,parameters)
Error, (in plots/odeplot) curve is not fully specified in terms of the ODE solution, found additional unknowns {alpha1, alpha2}
Warning, The use of global variables in numerical ODE problems is deprecated, and will be removed in a future release. Use the 'parameters' argument instead (see ?dsolve,numeric,parameters)
Error, (in plots/odeplot) curve is not fully specified in terms of the ODE solution, found additional unknowns {beta1, beta2}
Warning, The use of global variables in numerical ODE problems is deprecated, and will be removed in a future release. Use the 'parameters' argument instead (see ?dsolve,numeric,parameters)
Error, (in plots/odeplot) curve is not fully specified in terms of the ODE solution, found additional unknowns {delta1, delta2}
Warning, The use of global variables in numerical ODE problems is deprecated, and will be removed in a future release. Use the 'parameters' argument instead (see ?dsolve,numeric,parameters)
Error, (in plots/odeplot) curve 1 is not fully specified in terms of the ODE solution, found additional unknowns {alpha1, alpha2}
Walter Roberson
on 27 Feb 2025
In order for that Maple code to produce valid output plots, the symbols alpha1 alpha2 beta1 beta2 delta1 delta2 a b c h k all need to be given numeric values.
Nehad
on 3 Mar 2025
Accepted Answer
More Answers (0)
Categories
Find more on Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
