matlab中 sqrt(1+(cos(x))^2)的积分

学习 时间:2026-03-30 16:20:05 阅读:828
matlab中 sqrt(1+(cos(x))^2)的积分>> fun=inline('sqrt(1+(cos(x))^2)')fun =Inline function:fun(cos,x) = sqrt(1+(cos(x))^2)>> [R,k,T]=Romberg(fun,realmin,4,1e-6)Error using ==> inline.subsrefNot enough inputs to inline function.Error in ==> Romberg at 13T=h/2*(fun(a)+fun(b));>> syms x>> fun=sqrt(1+(cos(x))^2)fun =(1+cos(x)^2)^(1/2)>> [R,k,T]=Romberg(fun,0,4,1e-6)Subscript indices must either be real positive integers or logicals.Error in ==> Romberg at 13T=h/2*(fun(a)+fun(b));

最佳回答

大力的御姐

沉默的鸡

2026-03-30 16:20:05

fun=inline('sqrt(1+(cos(x)。^2)')这里x是向量 要用点乘或者点幂 fun=inline('sqrt(1+(cos(x)。^2))')fun = Inline function: fun(x) = sqrt(1+(cos(x)。^2))>> [R,T]=Romberg(fun,[0 4],1e-6)R = 4。9666T = 5。2178 0 0 0 0 0 0 4。7752 4。6276 0 0 0 0 0 4。9314 4。9834 5。0072 0 0 0 0 4。9578 4。9667 4。9656 4。9649 0 0 0 4。9645 4。9667 4。9667 4。9667 4。9667 0 0 4。9661 4。9666 4。9666 4。9666 4。9666 4。9666 0 4。9665 4。9666 4。9666 4。9666 4。9666 4。9666 4。9666

最新回答共有2条回答

  • 爱笑的小鸭子
    回复
    2026-03-30 16:20:05

    fun=inline('sqrt(1+(cos(x)。^2)')这里x是向量 要用点乘或者点幂 fun=inline('sqrt(1+(cos(x)。^2))')fun = Inline function: fun(x) = sqrt(1+(cos(x)。^2))>> [R,T]=Romberg(fun,[0 4],1e-6)R = 4。9666T = 5。2178 0 0 0 0 0 0 4。7752 4。6276 0 0 0 0 0 4。9314 4。9834 5。0072 0 0 0 0 4。9578 4。9667 4。9656 4。9649 0 0 0 4。9645 4。9667 4。9667 4。9667 4。9667 0 0 4。9661 4。9666 4。9666 4。9666 4。9666 4。9666 0 4。9665 4。9666 4。9666 4。9666 4。9666 4。9666 4。9666

上一篇 谁知道1998年的抗洪灾里面有哪儿些英雄人物啊?有哪儿些感人事迹啊?

下一篇 第3题的第2小题孩子一开始写的北京绿树成阴,有许多名胜古迹。但是答案是北京风景优美,有许多名胜古迹。