I am getting the error Unrecognized function or variable 'rankin'. and the error This statement is incomplete.
Mostra commenti meno recenti
format shortG
rankine = xlsread('input.xlsx','B2:I10');
rankine(1,1) = rankine(9,1);
rankine(1,4) = XSteam('h_pt',rankine(1,2),rankine(1,1));
sp = XSteam('psat_T',rankine(1,1)); % finds the saturation pressure
% that is used for rankine(1,6),
% (1,7), and (1,8)
rankine(1,6) = XSteam('vL_p',sp);
rankine(1,7) = XSteam('rhoL_p',sp);
rankine(1,8) = XSteam('CpL_p',sp);
rankine(2,4) = 3.6742*10^3
%Unrecognized function or variable 'rankin'.
%Error in project (line 57)
%rankin
%and Error This statement is incomplete.
Risposte (1)
Walter Roberson
il 4 Mar 2023
0 voti
you do not show us that code. But be careful about rankin compared to rankine
5 Commenti
Joshua
il 5 Mar 2023
Voss
il 5 Mar 2023
Perhaps the error about "rankin" is an old error - still appearing in the command window - from a previous version of the code that had a typo. Do you get that same error when you run the code now?
Also, please indicate which line shows the error "This statement is incomplete."
In general it's a good idea to copy the entire error message when posting here because it says the line number as well as the text of the line that causes the error.
Walter Roberson
il 5 Mar 2023
The error message is being reported for line 57 of a file that is only about 15 lines.
Perhaps you are not running the code you think you are running.
Joshua
il 5 Mar 2023
Walter Roberson
il 5 Mar 2023
If you are getting "undefined function or variable rankin" and it is pointing you to a line number that you believe reads rankine(2,4) = 3.6742*10^3 then you are not executing the function you think you are executing. Use
which -all project
to see where it is getting the project script from.
Categorie
Scopri di più su Programming in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!