Error in using refpropm.m in a Matlab function with Simulink
7 次查看(过去 30 天)
显示 更早的评论
Hello to everybody, I am trying to write a code in Simulink for modeling a CHP system but, at the moment, I cannot use the refpropm.m inside a MATLAB Function.
The whole code works perfectly in Matlab but, if I put an expression like "y = refpropm('T','p',u,'q',0,'water')" in a Matlab function inside Simulink I receive the following error:
_"This kind of expression is not supported.
Function 'refpropm.m' (#42.9054.9078), line 211, column 29: "@() rp_proto64(BasePath)" Launch diagnostic report."_
I'm using Matlab 2012b win32, but I've installed both versions (win32 and win64).
Can you help me ? Thank you very much Mattia
0 个评论
回答(1 个)
Haris Hussain
2018-6-14
Hello Dear
The simplest way to solve the issue is to use Matlab integrated function block and use the following syntax for defining the function refpropm('H','T', u(1),'P',u(2),'water')
i.e. calculating the enthalpy for water for the given values of temperature and Pressure. u(1) is the input value/values for Temperature and u(2) for pressure.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!