need to plot this question
Show older comments
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 Comments
Chad Greene
on 31 Mar 2015
Please show that you've made some effort on your own. Upload the code you've come up with so far. If a specific step is holding you up, describe the problem in detail.
James Tursa
on 31 Mar 2015
Please post what you have done so far and ask specific questions about it.
Nai Mansoor
on 31 Mar 2015
Edited: James Tursa
on 31 Mar 2015
Answers (1)
Michael Haderlein
on 1 Apr 2015
Edited: Michael Haderlein
on 1 Apr 2015
0 votes
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 Comments
Nai Mansoor
on 1 Apr 2015
Michael Haderlein
on 1 Apr 2015
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).
Categories
Find more on Desktop in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!