Info

この質問は閉じられています。 編集または回答するには再度開いてください。

when i run matlab code this sentence appear?

1 回表示 (過去 30 日間)
Firas Al-Kharabsheh
Firas Al-Kharabsheh 2016 年 4 月 4 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
when i run the code this sentence 'Undefined function or variable 'f'.' and this happens for all variable
  • note : the workspace in the program is empty
how can i fixed the problem????

回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2016 年 4 月 4 日
This message occurs when you use variables that are not defined. For example:
y=5*t
How Matlab will calculate 5*t if the variable t is not defined. the correct code is for example
t=10
y=5*t
  5 件のコメント
Walter Roberson
Walter Roberson 2016 年 4 月 4 日
編集済み: Walter Roberson 2016 年 4 月 4 日
If you had that line in a function, then the variable would be removed from the workspace as soon as that function returned.
Also, if you have a "clear" then you might be destroying the values. You should almost never have "clear all" in a program.
Firas Al-Kharabsheh
Firas Al-Kharabsheh 2016 年 4 月 4 日
If i clear the variable from workspace how can restore it ???

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by