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

8 views (last 30 days)
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)));

Accepted Answer

Fangjun Jiang
Fangjun Jiang on 11 Jul 2022
Edited: Fangjun Jiang on 11 Jul 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 Comments

Sign in to comment.

More Answers (1)

Steven Lord
Steven Lord on 11 Jul 2022
(C*log.(T))
You have an unnecessary . here.
  2 Comments
Image Analyst
Image Analyst on 11 Jul 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.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by