Constants and Matlab Workspace
Mostrar comentarios más antiguos
Say I have defined X1 = 20 in a script file and ran the script file. So my Workspace has X1=20.
I open up Simulink and create a model where I create a condition. I compare a new variable X2 (X2 = 40) to X1 in Simulink, and if X2 > X1, then set X1 = 40. I noticed that X1 appears to change to 40 in Simulink but not in the Workspace. Why is that?
So what is the actual value of X1 in Matlab? is it 20 or 40 then? or maybe Im not doing something correctly here?
Respuesta aceptada
Más respuestas (1)
dpb
el 7 de Mzo. de 2020
1 voto
I've never seen an installation of Simulink but I'm sure it and MATLAB do not share the same workspace...a search finds lots of links on sharing data between the two; just a couple that look probably germane (again, pure guesswork here)
<Share-data-between-workspaces> (all within MATLAB workspaces)
Categorías
Más información sobre Interactive Model Editing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!