How can I calculate those two simultaneously?

1 回表示 (過去 30 日間)
Arko Tuisk
Arko Tuisk 2019 年 11 月 10 日
回答済み: Image Analyst 2019 年 11 月 10 日
a = -8.2 * 10^-7;
b = 0.65;
Wempty = a*Wto +b;
Wto = (2240 + 246)/(1 - 0.1685 - Wempty);
display(Wempty)
display(Wto)
This is my code and I do not get any answer, and no error as well.

採用された回答

Image Analyst
Image Analyst 2019 年 11 月 10 日
You should have gotten this error because you did not assign Wto to anything before you tried to use it:
Undefined function or variable 'Wto'.
Error in test5 (line 3)
Wempty = a*Wto +b;
Please give us your entire code.
MATLAB will do exactly what you tell it to do. For example, if you assign Wto to something (like 10) before you use it, this code gives you a result with no error:
a = -8.2 * 10^-7;
b = 0.65;
Wto = 10
Wempty = a*Wto +b;
Wto = (2240 + 246)/(1 - 0.1685 - Wempty);
display(Wempty)
display(Wto)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by