Error using step function in Matlab Cantera

123 views
Skip to first unread message

cade Oh

unread,
May 5, 2016, 8:44:10 AM5/5/16
to Cantera Users' Group
Hi guys

I am currently practicing Reactors in Cantera using Matlab

I found out that there is already another function named step in Matlab.

Its function is to plot step response of dynamic system, and its presence has higher priority than Cantera step.

Error message:
The values of the "num" and "den" properties must be row vectors or cell arrays of row
vectors, where each vector is nonempty and containing numeric data. Type "help tf.num"
or "help tf.den" for more information.

Does anyone have similar problems before?

Thanks

SungKyun,
Mechanical Engineering
SNU

Ray Speth

unread,
May 5, 2016, 10:21:06 AM5/5/16
to Cantera Users' Group
SungKyun,

Many Matlab functions are overloaded like this, with the type of the arguments used to disambiguate the correct version of the function to call. Can you please provide a simple example which demonstrates the error, so we can see what is causing the error?

Regards,
Ray

cade Oh

unread,
May 6, 2016, 8:16:26 AM5/6/16
to Cantera Users' Group
Ray,

After having struggled with it yesterday, I found out the problem was exactly what you pointed out. 

One of the parameters when calling step function in Cantera had type of ReactorNetwork, when I was trying to transfer instance type of Reactor.

Thank you very much for your explanation Ray.

Best,
SungKyun

r = Reactor(g,4); %% Constant pressure reactor (Gas turbine condition)
rr = ReactorNet({r}); 

ahfaz ahmed

unread,
Jun 5, 2016, 11:07:00 AM6/5/16
to Cantera Users' Group
HI Ray,

Could you pl help with the matlab substitute of (r1.thermo.P)- from python cantera

Ray Speth

unread,
Jun 9, 2016, 4:43:54 PM6/9/16
to Cantera Users' Group
Hi,

This is covered in the documentation for the Matlab toolbox. The specific page which covers the functions for reactors and reactor networks is http://cantera.github.io/docs/sphinx/html/matlab/code-docs/zero-dim.html#reactor.

Regards,
Ray
Reply all
Reply to author
Forward
0 new messages