Check for missing argument or incorrect argument data type in call to function 'log'.
12 ビュー (過去 30 日間)
古いコメントを表示
Hallo wenn ich diese Codezeile ausführe bekommen ich die obige Fehlermeldung.
TPC=TP-273.15;
ESP=6.112.*exp(17.67.*TPC./(243.5+TPC));
EVP=RP.*PP./(EPS+RP);
RH=EVP./ESP;
RH=min(RH,1.0);
ALV=ALV0+CPVMCL.*TPC;
S=(CPD+RP.*CL).*log(TP)-RD.*log(PP-EVP)+ ALV.*RP./TP-RP.*RV.*log(RH);
Wäre super wenn mir jemand helfen könnte.
0 件のコメント
回答 (1 件)
Stephan
2021 年 3 月 7 日
編集済み: Stephan
2021 年 3 月 7 日
Für mich funktioniert es, wenn ich numerische Werte für die Variablen definiere:
TP = 500;
RP = 200;
PP = 201;
EPS = 100;
ALV0 = 0;
CPVMCL = 10;
CPD = 10;
CL = 0;
RD = 10;
RV = 2;
TPC=TP-273.15;
ESP=6.112.*exp(17.67.*TPC./(243.5+TPC));
EVP=RP.*PP./(EPS+RP);
RH=EVP./ESP;
RH=min(RH,1.0);
ALV=ALV0+CPVMCL.*TPC;
S=(CPD+RP.*CL).*log(TP)-RD.*log(PP-EVP)+ ALV.*RP./TP-RP.*RV.*log(RH)
liefert:
S =
3.1014e+03
Ich gehe davon aus, dass Du irgendwo eine Variable falschen Typs definiert hast, die den Fehler verursacht - versuche:
>> whos
Sollte so aussehen...
Name Size Bytes Class Attributes
ALV 1x1 8 double
ALV0 1x1 8 double
CL 1x1 8 double
CPD 1x1 8 double
CPVMCL 1x1 8 double
EPS 1x1 8 double
ESP 1x1 8 double
EVP 1x1 8 double
PP 1x1 8 double
RD 1x1 8 double
RH 1x1 8 double
RP 1x1 8 double
RV 1x1 8 double
S 1x1 8 double
TP 1x1 8 double
TPC 1x1 8 double
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!