Error "Argument to dynamic structure reference must evaluate to a valid field name." What did I wrong?

1 visualización (últimos 30 días)
Hi,
I became the error "Argument to dynamic structure reference must evaluate to a valid field name."
I tried a lot to set right the dots but I dont know why it isnt working. Can someone help me?
here's the code:
T_1=linspace(0,160,160);
T=T_1+273.15;
A= -181.587;
B= 8632.13;
C= 24.7981;
D= 0;
H12= 1./(exp(A+(B./T)+(C*log.(T))+(D*T)));

Respuesta aceptada

Fangjun Jiang
Fangjun Jiang el 11 de Jul. de 2022
Editada: Fangjun Jiang el 11 de Jul. de 2022
T_1=linspace(0,160,160);
T=T_1+273.15;
A= -181.587;
B= 8632.13;
C= 24.7981;
D= 0;
H12= 1./(exp(A+(B./T)+(C*log(T))+(D*T)))
H12 = 1×160
1.0e+05 * 0.5242 0.5373 0.5505 0.5638 0.5771 0.5904 0.6037 0.6170 0.6303 0.6436 0.6569 0.6701 0.6833 0.6965 0.7096 0.7226 0.7356 0.7484 0.7612 0.7739 0.7864 0.7989 0.8112 0.8234 0.8355 0.8474 0.8591 0.8707 0.8821 0.8934
  3 comentarios

Iniciar sesión para comentar.

Más respuestas (1)

Steven Lord
Steven Lord el 11 de Jul. de 2022
(C*log.(T))
You have an unnecessary . here.
  2 comentarios
Coginator
Coginator el 11 de Jul. de 2022
It also doesnt works
"Error using /
Matrix dimensions must agree." is the answer from matlab
Image Analyst
Image Analyst el 11 de Jul. de 2022
H12= 1./(exp(A+(B./T)+(C*log.(T))+(D*T)));
% ^ Look up above. Get rid of this dot!
% Should be
H12= 1./(exp(A+(B./T)+(C*log(T))+(D*T)));
Also, the same as the answer below.

Iniciar sesión para comentar.

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by