how do I integrate a pre-recorded function?
조회 수: 1 (최근 30일)
이전 댓글 표시
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
채택된 답변
Star Strider
2021년 4월 24일
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
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!