Inner matrix dimensions must agree.

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 :)

 采纳的回答

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 中查找有关 MATLAB 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by