Borrar filtros
Borrar filtros

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

2 visualizaciones (últimos 30 días)
Matthias86
Matthias86 el 17 de Sept. de 2014
Respondida: Haris Hussain el 14 de Jun. de 2018
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

Respuestas (1)

Haris Hussain
Haris Hussain el 14 de Jun. de 2018
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.

Categorías

Más información sobre Simulink en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by