Borrar filtros
Borrar filtros

How to use XSteam m-file with Simulink?

7 visualizaciones (últimos 30 días)
Tarek Sobh
Tarek Sobh el 23 de Feb. de 2014
Respondida: Carminatti el 19 de Jun. de 2019
Hello everyone, I'm trying to use XSteam m-file with Simulink. The code that I'm using inside the MATLAB Function block goes as follows:
function h10 = fcn(t10)
%#codegen
coder.extrinsic('XSteam');
h10 = coder.nullcopy(zeros(size(t10)));
h10=XSteam('hV_T',t10);
With this, I'm not getting the output 'h10' and I'm getting the following error:
Making simulation target "SSubstitution_sfun", ...
/bin/bash: /Applications/MATLAB: No such file or directory
I'm getting my answer with simply writing the following in MATLAB's Command Window:
XSteam('hV_T',4.5)
ans =
2.5092e+03
as t10=4.5 and h10=2.5092e+03. Would really appreciate your help guys. Thanks

Respuestas (2)

Carminatti
Carminatti el 19 de Jun. de 2019
Hello There,
I am sorry to answer this question only five years after you posted, but here is how to use the XSteam library within Simulink:
You will have to use the level2 S-Function block.
within that block, on the Outputs section you can use the XSteam, or any other (I believe) matlab function.
Using the level2 S-function looks complicated but following this youtube video might help a lot:
In my case I was able to use the XSteam function within another code inside Simulink.

Tarek Sobh
Tarek Sobh el 28 de Feb. de 2014
I'm still stuck here :(

Categorías

Más información sobre Data Import and Analysis 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