Derivatives in Embedded Matlab
Derivatives in Embedded Matlab
(OP)
Hi there,
In Simulink, I'm trying to differentiate a function with respect to a non-time variable. So I created an embedded matlab function and wrote down the following:
function phi = func(B)
syms x;
phi = diff(cosh(B*x)-cos(B*x)...),x);
This function works if called from Matlab console, but with Simulink it complains that "command duality is not supported". What's the way to do it then?
Thanks,
Hasan
In Simulink, I'm trying to differentiate a function with respect to a non-time variable. So I created an embedded matlab function and wrote down the following:
function phi = func(B)
syms x;
phi = diff(cosh(B*x)-cos(B*x)...),x);
This function works if called from Matlab console, but with Simulink it complains that "command duality is not supported". What's the way to do it then?
Thanks,
Hasan
RE: Derivatives in Embedded Matlab
Cheers
Greg Locock
New here? Try reading these, they might help FAQ731-376: Eng-Tips.com Forum Policies http://eng-tips.com/market.cfm?
RE: Derivatives in Embedded Matlab
The function is way longer than what I typed above, that's why I put the ellipsis :P
I might be able to differentiate it this time, is there an easier way though?
Hasan
RE: Derivatives in Embedded Matlab
Thanks for the help.
RE: Derivatives in Embedded Matlab
Cheers
Greg Locock
New here? Try reading these, they might help FAQ731-376: Eng-Tips.com Forum Policies http://eng-tips.com/market.cfm?