func = @(t) sin(t).*(cos(t).^2)
for x=0:10:90
teta=deg2rad(x)
q = integral(fun,0,teta)
plot(teta,q)
hold on
end
I get this error : Error using * Inner matrix dimensions must agree.
hope to get some help figurng it out :)

 채택된 답변

Torsten
Torsten 2018년 4월 27일

0 개 추천

func = @(t) sin(t).*cos(t).^2;
x = 0:10:90;
theta = deg2rad(x);
for i=1:numel(theta)
q(i) = integral(func,0,theta(i));
end
plot(theta,q)
Best wishes
Torsten.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by