Borrar filtros
Borrar filtros

Help with symbolic variables

2 visualizaciones (últimos 30 días)
Tom
Tom el 6 de Mzo. de 2014
Hello,
I have the following to calculate associated legendre polynomials (in terms of angles: http://en.wikipedia.org/wiki/Associated_legendre_polynomials#Reparameterization_in_terms_of_angles)
%Calculating associated legendre polynomials %Using Rodriguez formula
syms z theta
m = 0;
l = 0;
for i = 1:10
Pl(i,:) = (inv((2^l)*factorial(l)))*diff(((z^2 - 1)^l),l);
Plm(i,:) = ((-1)^m)*((sin(theta))^m)*diff(Pl(i,:),m);
Plm(i,:) = subs(Plm(i,:), z, cos(theta));
l = l + 1;
end
I am struggling to find the way to replace the symbolic variable theta with a vector containing numerical values.
Any help would be greatly appreciated.
Tom

Respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by