How can I calculate those two simultaneously?

1 visualización (últimos 30 días)
Arko Tuisk
Arko Tuisk el 10 de Nov. de 2019
Respondida: Image Analyst el 10 de Nov. de 2019
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.

Respuesta aceptada

Image Analyst
Image Analyst el 10 de Nov. de 2019
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)

Más respuestas (0)

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by