how do I integrate a pre-recorded function?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Pavel Kuzmitsky
le 24 Avr 2021
Réponse apportée : Star Strider
le 24 Avr 2021
I tried to write it as follows, but it gives an error
syms r theta
p1 = r.* cos(theta);
polarfun = @(r,theta) p1;
q = integral2(polarfun,0,1,0,2*pi)
please tell me how to do this correctly?
0 commentaires
Réponse acceptée
Star Strider
le 24 Avr 2021
Try this —
syms r theta
p1 = r.* cos(theta);
polarfun(r,theta) = p1
polarfcn = matlabFunction(polarfun) % Slightly Renamed To Avoid Over-Writing Original
q = integral2(polarfcn,0,1,0,2*pi)
.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Calculus dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!