What the solution this integral ?

What the solution this integral ?

Post by ayon » Tue, 06 Jul 2004 21:46:11


Hi, can anyone help me for hint or solution my problem as follow :

y=[12.3 12.5 12.0 13.2 14.5 11.9 12.5 31.3];
syms x,y;
A=int(x,0,y)

Why can't the true result? I want output of A is 8x1 size.

Thanks for help me.

Regards,

Albert Tan
 
 
 

What the solution this integral ?

Post by Keith Sinc » Tue, 06 Jul 2004 22:05:41

Hi,
try something like :
syms x y
y=[12.3 12.5 12.0 13.2 14.5 11.9 12.5 31.3];
A = int(y,x)

This gives the following answer:
A =
[ 123/10*x, 25/2*x, 12*x, 66/5*x, 29/2*x, 119/10*x, 25/2*x,
313/10*x]

You can put limits on the integral using (-2 < x < 3)
A = int(y,x,-2,3)

Hope this helps


Keith

 
 
 

What the solution this integral ?

Post by Steven Lor » Wed, 07 Jul 2004 21:42:48


So you want the integral of x from 0 to each element in y? Try this:

y=[12.3 12.5 12.0 13.2 14.5 11.9 12.5 31.3];
syms x UL
A=int(x, 0, UL);
subs(A, UL, y)

--
Steve Lord
XXXX@XXXXX.COM