Constants and Matlab Workspace
이전 댓글 표시
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?
채택된 답변
추가 답변 (1개)
dpb
2020년 3월 7일
1 개 추천
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)
카테고리
도움말 센터 및 File Exchange에서 Interactive Model Editing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!