Matlabd variable is not chaning in workspace
이전 댓글 표시
All of a sudden my workspace is not updating values changed in the script file. It keeps restoring back to the orginal values. Could this be an issue with the file path? If so, how do you fix this>
댓글 수: 2
Michelle Bollini
2023년 1월 3일
Voss
2023년 1월 3일
Can you upload your script (using the paperclip icon)?
답변 (2개)
Sulaymon Eshkabilov
2023년 1월 3일
Start your code with:
clearvars
댓글 수: 3
Michelle Bollini
2023년 1월 3일
Sulaymon Eshkabilov
2023년 1월 3일
can you share your code or the part of it where you have a problem?
Michelle Bollini
2023년 1월 4일
Sulaymon Eshkabilov
2023년 1월 4일
1 개 추천
Michelle,
Looking at your attached code that recalls your system function and simulates it, I presume that you are working with homogenouse DE, correct?
If so, with your set initial conditions (ICs) and default error tolerances of ODE45, your simulation results (numerical solutions) will be only zeros. All ICs are M0_1 = [10e-19 10e-19 10e-19 10e-19 10e-19 10e-19 10e-19], which are almost zero. To might best knowldge, the default error tolerance (relative error) of ODE45 is 1e-3 that means with your set ICs (10e-19), the system response will not be different from "0". There is nothing to do with the path or directory or other syntax issues as I see here. It is all about your set ICs.
Therefore, suggeston 1 - change your set ICs to greater values.
댓글 수: 3
Michelle Bollini
2023년 1월 5일
편집: Michelle Bollini
2023년 1월 5일
Sulaymon Eshkabilov
2023년 1월 5일
Without looking at your code and/or a system equations, it is a bit difficult to guess how to resolve your issue.
Michelle Bollini
2023년 1월 5일
카테고리
도움말 센터 및 File Exchange에서 Historical Contests에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!