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.应该如何解决?

 Respuesta aceptada

0 votos

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

Más respuestas (0)

Categorías

Más información sobre Symbolic Math Toolbox en Centro de ayuda y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!