Phase portrait in Matlab and simulink

63 vues (au cours des 30 derniers jours)
Abdulrahman Odhah
Abdulrahman Odhah le 17 Avr 2020
Hello there,
I am working on modeling a system and showing its trajicotores using the phase plane portirate for various valuse of initial conditaons,
I had one problem with simout, I am exporting the variable x to the matlab workspace but still showing that it is unrecognized,
the second issue is that the following code is spposed to show the phase portirate but still not sure of the result because I cant get the variable x from simulink work space,
do I have to use different properties in the blcok sinks>to workspace, or just the default?
and is the following loop will show the required plot or won't?
I hope to get some ideas about it,
attached is the system model and the code
I have defined the required valuse for system stability a and b along with the initial conditios
clear all
clc
a=1;b=1;
Tfinal=15;
Time_inv=1;
ic=1;
for x0=-ic:.25:ic
x_dot0=-sqrt(ic^2-x0^2);
sim('SystemB');
figure(1)
plot(x,x_dot)
hold on;
figure(2)
polt(time,x)
hold one;
figure(3)
plot(time,x_dot)
hold on;
end

Réponses (1)

Gashu Mesfin
Gashu Mesfin le 2 Juin 2020

Catégories

En savoir plus sur Simulink Environment Customization dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by