Hi, quick question.(adsbygoogle = window.adsbygoogle || []).push({});

I have an inline function I would like to differentiate symbolically in Matlab, however when I do it I get the following:

say

x = inline('cos(t.^2)','t') ;

xp = inline(char(diff(x(t),sym('t'))),'t') ;

xp(t) becomes

-sin(t^2)*t

however I really want:

-sin(t.^2).*t (vectorial notation)

I've looked at the diff function help, and it's a bit bare (as I would expect any symbolic manipulation functions to be in Matlab lol) and doesn't seem to say how I get this derivative to handle vectors the way I want it to...

Thank you.

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Symbolic Differentiation in Matlab

Loading...

Similar Threads - Symbolic Differentiation Matlab | Date |
---|---|

Maple - Explicit Set Definition & Natural Number Symbol | Oct 31, 2016 |

Matlab Number formats in Matlab [not to use e symbol] | Jun 10, 2016 |

Matlab Greek symbols on Matlab workspace | Jun 10, 2016 |

Too little appearance of symbols and numbers in matlab [Solved] | Jun 10, 2016 |

Symbolic vector differentiation with Mathematica | Jan 31, 2013 |

**Physics Forums - The Fusion of Science and Community**