Error in using refpropm.m in a Matlab function with Simulink

조회 수: 2 (최근 30일)
Matthias86
Matthias86 2014년 9월 17일
답변: Haris Hussain 2018년 6월 14일
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

답변 (1개)

Haris Hussain
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.

카테고리

Help CenterFile Exchange에서 Control Systems에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by