Matlab does not return an error when variable does not exist.
古いコメントを表示
Hello everyone. Hope someone can help:
I call a variable that does not exist (in Editor) and I do not get an error message. in the Command Window.
Did I disable this capability by mistake?
4 件のコメント
Alvaro Chaveste
2022 年 2 月 19 日
Image Analyst
2022 年 2 月 19 日
編集済み: Image Analyst
2022 年 2 月 19 日
Which is the variable you're talking about? What is a "command issue"? Please post a screenshot showing
- your code editor with execution stopped just after you executed that line,
- the workspace so we can verify that the variable is not in there.
- the command window so we can see that no error was thrown.
Alvaro Chaveste
2022 年 2 月 19 日
Alvaro Chaveste
2022 年 2 月 19 日
採用された回答
その他の回答 (1 件)
Image Analyst
2022 年 2 月 19 日
So you're saying that modFracts does not exist and when you do
who modFracts
it does not echo anything to the command window. That is normal. If it doesn't exist, it doesn't write anything to the command window. However if you do
modFractsCopy = modFracts;
it should throw an error because you're trying to reference/use it. Does it throw an error?
Try adding an s:
whos
and tell us what it shows.
6 件のコメント
Alvaro Chaveste
2022 年 2 月 19 日
Walter Roberson
2022 年 2 月 19 日
whos will not show any output for functions.
Alvaro Chaveste
2022 年 2 月 19 日
Image Analyst
2022 年 2 月 19 日
編集済み: Image Analyst
2022 年 2 月 19 日
Please attach a small snippet that I can run that illustrates the fact.
Why is modFracts and modFractsCopy not showing up in the Workspace if you executed that line of code? It should either show up there or throw an error.
Alvaro Chaveste
2022 年 2 月 19 日
Image Analyst
2022 年 2 月 19 日
編集済み: Image Analyst
2022 年 2 月 19 日
We can't run images, only code as text. Will check back later. Make it easy for us to help you, not hard.
カテゴリ
ヘルプ センター および File Exchange で HDL Coder についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!