用matlab求椭圆周长,数值积分法.椭圆形式如下:x^2/4+y^2/9=1
问题描述:
用matlab求椭圆周长,数值积分法.椭圆形式如下:x^2/4+y^2/9=1
答
半椭圆y=3√(1-x^2/4)椭圆周长=2×∫√(1+y′²)dxmatlab>> syms x>> y=3*(1-x^2/4)^(1/2);>> y1=diff(y,x);>> f=(1+y1^2)^(1/2)f =(1 - (9*x^2)/(16*(x^2/4 - 1)))^(1/2)>> ss=@(x)(1 - (9*x.^2)./(16*(x.^...