need to plot this question
1 次查看(过去 30 天)
显示 更早的评论
plot the compressibility chart using peng and robinson equation of state the values of Tr 1.0-1.5 (increment of 0.1) and Pr from 0-10 .. using the global for Pr and Tr
pc = 220.55
Tc = 647.1
3 个评论
James Tursa
2015-3-31
Please post what you have done so far and ask specific questions about it.
回答(1 个)
Michael Haderlein
2015-4-1
编辑:Michael Haderlein
2015-4-1
Please... Did you ever write this into the Matlab editor? If so, you would see that the error is in the very first line - you cannot have a & character in the function name.
Some more errors will appear running the program as Tr seems to be an array. You need element-wise operations here. Until you know you want matrix operations, you can simply replace all * by .*, all / by ./ and all ^ by .^ (the dots indicate element-wise operations).
What really surprises me is the fact that the use of the globals Pr and Tr seems to be part of the task. Is that really what your teacher wants you to do?
2 个评论
Michael Haderlein
2015-4-1
Did you have a look on James' link? Right at the beginning it says:
---------------------------------------------------------
3) Show what you have attempted so far and if you have got:
- an error then post the whole error message. We need ALL the red text, not just a small part snipped out of it. This means line numbers, actual lines of code that generated the error, traceback to prior functions, etc. - everything that is in red color.
---------------------------------------------------------
It costs our time to answer your questions, so please also invest time for reading links provided by the community (and follow the recommendations therein).
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!