syms a b;
E1=a+b;
E2=a-b;
E3=1;
G=min([E3;E1;E2]);%
c=int(int(G,a,0,pi/2),b,0,2*pi);
我的目的是相求一个式子的积分,但式子中包含了一个取最小值的式子G。运行程序后提示Input arguments must be convertible to floating-point numbers.应该如何解决?

 Réponse acceptée

0 votes

G=@(a,b)min([a+b;a-b;1]);
integral(@(b)integral(@(a)G(a,b),0,pi/2,'ArrayValued',true),0,2*pi,'ArrayValued',true)
ans =-23.2857

Plus de réponses (0)

Catégories

En savoir plus sur Symbolic Math Toolbox dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!