matlab y=(600000*600000*6*4*0.00424^2*(10^-12)*log(0.025/0.01674)+103000*103000*0.003*(2*10^-5)^3)/(0.003*(2*10^-5)^3+6*4*0.00424^2*(10^-12)*log(0.025/0.01674));fun=inline('x.*(y-(y-103000^2)*log(x./0.01674)/log(0.025/0.01674)).^0.5');z=quad(fun,0.01

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/20 07:53:59
matlaby=(600000*600000*6*4*0.00424^2*(10^-12)*log(0.025/0.01674)+103000*103000*0.003*(2*10^-5)^3)/(0

matlab y=(600000*600000*6*4*0.00424^2*(10^-12)*log(0.025/0.01674)+103000*103000*0.003*(2*10^-5)^3)/(0.003*(2*10^-5)^3+6*4*0.00424^2*(10^-12)*log(0.025/0.01674));fun=inline('x.*(y-(y-103000^2)*log(x./0.01674)/log(0.025/0.01674)).^0.5');z=quad(fun,0.01
matlab
y=(600000*600000*6*4*0.00424^2*(10^-12)*log(0.025/0.01674)+103000*103000*0.003*(2*10^-5)^3)/(0.003*(2*10^-5)^3+6*4*0.00424^2*(10^-12)*log(0.025/0.01674));
fun=inline('x.*(y-(y-103000^2)*log(x./0.01674)/log(0.025/0.01674)).^0.5');
z=quad(fun,0.01674,0.025);
w=2*pi* z+pi*0.01674^2.*(y)^0.5-pi*0.025^2*103000
就是这样一个函数问题,我希望算出x值之后,将x的值放入第二个函数中继续计算,最终将z的值和x的值一起代入第三个式中算出w 但是在第二步一直有错,Error using ==> inline.subsref
Not enough inputs to inline function.
我的叙述有误,应该是算出y值后将y的值代入第二第三个式中

matlab y=(600000*600000*6*4*0.00424^2*(10^-12)*log(0.025/0.01674)+103000*103000*0.003*(2*10^-5)^3)/(0.003*(2*10^-5)^3+6*4*0.00424^2*(10^-12)*log(0.025/0.01674));fun=inline('x.*(y-(y-103000^2)*log(x./0.01674)/log(0.025/0.01674)).^0.5');z=quad(fun,0.01
你错在
z=quad(fun,0.01674,0.025);
quad是一个求一元数值积分的函数,要求三个参数quad('函数名',积分下限,积分上限),而你的函数
fun=inline('x.*(y-(y-103000^2)*log(x./0.01674)/log(0.025/0.01674)).^0.5');
有两个未知量x和y,所以错了.修改如下:
fun=inline(['x.*(',num2str(y-(y-103000^2)),'*log(x./0.01674)/log(0.025/0.01674)).^0.5']);
经过如上修改就没有错误了.