Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng 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
Joined
May 31, 2010
Messages
3
Location
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
 
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