How do I get the differential of Hermite polynomial function?

syms m1 x
diff(hermiteH(m1, x),x)

10 Comments

In MATLAB Online (2020b):
>> syms m1 x
diff(hermiteH(m1, x),x)
ans =
2*m1*hermiteH(m1 - 1, x)
which hermiteH -all % what does it show?
For me it shows:
>> which hermiteH -all
/MATLAB/toolbox/symbolic/symbolic/@single/hermiteH.m % single method
/MATLAB/toolbox/symbolic/symbolic/@double/hermiteH.m % double method
hermiteH is a built-in method % matlab.unittest.Verbosity method
/MATLAB/toolbox/symbolic/symbolic/@sym/hermiteH.m % sym method
>>
I did not understand what you want from it, but I updated the program to the latest version, but the same problem, if you could explain more, please
Run the below in command window and paste the output here:
which hermiteH -all % what does it show?
I have got
>> which hermiteH -all % what does it show?
C:\Program Files\Polyspace\R2020a\toolbox\symbolic\symbolic\@double\hermiteH.m % double method
C:\Program Files\Polyspace\R2020a\toolbox\symbolic\symbolic\@single\hermiteH.m % single method
C:\Program Files\Polyspace\R2020a\toolbox\symbolic\symbolic\@sym\hermiteH.m % sym method
>>
Hi,
This might be unrelated to your original question, but the paths you show seem a little strange. You show a Polyspace path but you are using the Symbolic Math Toolbox which is unrelated to Polyspace.
The paths show:
C:\Program Files\Polyspace\R2020a\toolbox\symbolic\symbolic\@double\hermiteH.m
Whereas it should be:
C:\Program Files\MATLAB\R2020a\toolbox\symbolic\symbolic\@double\hermiteH.m
Did you by any chance do an addpath(genpath('C:\Program Files\Polyspace')) to your MATLAB installation to integrate Polyspace and MATLAB? If so, please use restoredefaultpath to restore the default MATLAB path (or at least use rmpath to remove paths starting with C:\Program Files\Polyspace) and then use the official instructions to integrate Polyspace and MATLAB.

Sign in to comment.

Answers (2)

https://www.mathworks.com/matlabcentral/answers/606286-how-do-i-get-the-differential-of-hermite-polynomial-function#comment_1039721 , you have to run the code in MATLAB by pressing enter in command window or by pressing the green triangle button in script or shift + ctrl/cmd.
Did you run the code you posted?
When I run it (in R2020b):
syms m1 x
DHx = diff(hermiteH(m1, x),x)
I get:
DHx =
2*m1*hermiteH(m1 - 1, x)
.

8 Comments

yes in (R2018A).But I got nothing
I have no idea what the problem could be with R2018a.
Be certain you have downloaded and installed all the Updates. (I believe in R2018a use Add-Ons —> Check for Updates, however if that does not work, try Help —> Check for Updates. That changed, however I do not remember in what version.)
The same problem in matlab R2020a
If you have all the updates and it is still not working, your only option may be to upgrade to 2020b..
Thank you very much but I don't own this update yet
My pleasure.
That may be the only option.
My pleasure!
In the interim, you can use the result I posted.

Sign in to comment.

Asked:

on 6 Oct 2020

Edited:

on 8 Oct 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!