Integration help (quad)
이전 댓글 표시
New to Matlab and stuck trying to integrate trigXtrig function.
Here's what I've been doing:
function y=rfun(theta)
y=(cos(theta).*sin(theta).);
end
EDU>> q=quad('rfun',0,0.644)
But I get this error:
Error in ==> quad at 77
y = f(x, varargin{:});
댓글 수: 1
John D'Errico
2011년 4월 8일
So what error did you get???? You only wrote part of the error here, the part that gives insufficient information!
채택된 답변
추가 답변 (2개)
Friedrich
2011년 4월 8일
Hi Jeffrey,
I think you get this error because of the extra dot after sin(theta). You function rfun should look like this:
function y=rfun(theta)
y=(cos(theta).*sin(theta));
end
I hope I could help, Friedrich
카테고리
도움말 센터 및 File Exchange에서 Pole and Zero Locations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!