How do I incorporate the following lines to Matlab R2013: Because it keeps giving errors that legendrep is not defined

2 views (last 30 days)
arg = 0.5;
P = legendrep(2,'cos(arg)');
P_n = eval(P);

Accepted Answer

Star Strider
Star Strider on 1 Sep 2015
Since MATLAB is case-sensitive, you needto capitalize the ‘P’. This works (in R2015a):
arg = 0.5;
P_n = legendreP(2, cos(arg))
P_n =
0.6552

More Answers (0)

Categories

Find more on Downloads in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!