Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Derivatives in Embedded Matlab 1

Status
Not open for further replies.

alrubaie

Electrical
May 31, 2010
3
CA
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
 
Replies continue below

Recommended for you

Hi Greg,

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
 
That was silly, never mind.
Thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top