"??? Undefined function or variable 'v_pT'."
Mostra commenti meno recenti
I downloaded IAPWS_IF97.m file. I try to use any of the noted functions but Matlab just states:
"??? Undefined function or variable 'v_pT'."
I can write other functions and they work. I guess it is something in the .m file.
Any help is greatly appreciated.
3 Commenti
So you downloaded an Mfile (but you are not going to show us where from), and when you try to use the Mfile (and you don't show us how you try to use it) the Mfile gives an error (which you showed only one line of) and you suspect that "it is something in the .m file" (but of course you did not show us the Mfile either).
Now let me read my crystal ball and check my tarot cards to find out what the problem is...
Or would you prefer to actually give us some real information to help us diagnose the problem?
Taylor
il 12 Mag 2016
You forgot to make the first argument a string:
IAPWS_IF97('v_pT', 50, 290)
This is shown quite clearly in the documentation given at the link you gave.
Risposte (2)
Walter Roberson
il 12 Mag 2016
0 voti
3 Commenti
Taylor
il 12 Mag 2016
John D'Errico
il 12 Mag 2016
Have you actually defined the variable v_pT in the current workspace, so that it can be passed into this function?
Walter Roberson
il 12 Mag 2016
IAPWS_IF97('v_pT', 50, 290)
John D'Errico
il 12 Mag 2016
I'll guess your problem is for some reason, you have not bothered to define the variable v_pT that you are then passing into the function.
MATLAB is telling you that you have not done so. It would give anyone exactly the same error, IF they had no variable with that name in their workspace, but then tried to call the function as
IAPWS_IF97(v_pT, 50, 290)
You have not provided enough information to know this is the answer. But your apparent lack of understanding of MATLAB in general seems to suggest this as the case.
2 Commenti
John D'Errico
il 12 Mag 2016
I don't know if this is intended to be a function, as part of what you downloaded, or if it is a variable. But MATLAB cannot find something with that name in your workspace, or in your directories.
Categorie
Scopri di più su Downloads 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!