Filter löschen
Filter löschen

help with integral2

3 Ansichten (letzte 30 Tage)
Pavel Kuzmitsky
Pavel Kuzmitsky am 22 Dez. 2020
Kommentiert: John D'Errico am 22 Dez. 2020
the code does not work, I do not understand what I should do, I did not find a detailed explanation in the examples
fun = @(x,y) (2*x + sqrt(6)*y) .* 2*x;
polarfun = @(theta,r) fun(r.*cos(theta),r.^2.*cos(2*theta));
q = integral2(polarfun,0,2*pi,0,1)
tried to integrate the polynomial
(2*r*cos(x)+sqrt(6)*2*r^2*cos(2*x))*(2*r*cos(x))
  1 Kommentar
John D'Errico
John D'Errico am 22 Dez. 2020
What does not work? Why do you think it does not work? In what way did it fail?
I might even ask why do you think that to be a polynomial? I suppose it is one, in r.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

VBBV
VBBV am 22 Dez. 2020
%true
fun = @(x,y) (2*x+sqrt(6)*y).*2.*x; % use dot
polarfun = @(r,theta) fun(r.*cos(theta),r.^2.*cos(2.*theta));
q = integral2(polarfun,0,2*pi,0,1)
Use element wise multiplication

Weitere Antworten (0)

Kategorien

Mehr zu Polynomials finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by