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 CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by