chebyshev with sinus parameter as an input
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
fima v
am 14 Mai 2017
Bearbeitet: fima v
am 8 Jul. 2017
Hello, is there a way to get an expression for P_n(sin (theta)) a chebyshev polynomial with sinus theta as an input parameter?
Thanks
0 Kommentare
Akzeptierte Antwort
John D'Errico
am 14 Mai 2017
Bearbeitet: John D'Errico
am 14 Mai 2017
What have you tried? If nothing, then why not?
Easy enough to build a Chebychev polynomial, using the standard recursion relations. Wikipedia will surely give them, and I know that sufficient information can be found in Abramowitz and Stegun, because I wrote tools based on that long ago. My copy of Abramowitz and Stegun is so well used that I put tabs in it at a few useful pages. (A useful text.) Then you just make it into a function of theta, as you wish. So just create a function handle.
Probably easier yet is to download the chebfun toolbox, which will probably make it easy to solve that problem. So 2 simple lines of code.
p3 = chebpoly(3);
pfun = @(theta) p3(sin(theta));
pfun(.5)
ans =
-0.99749
Or, if you wanted it for a general value of n, not fixed in advance as I did, then just write a function m-file.
1 Kommentar
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Polynomials finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!