MATLAB: How to calculate those two simultaneously

helpsimple

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.

Best Answer

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)