早教吧作业答案频道 -->其他-->
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
题目详情
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.subsref
Not enough inputs to inline function.
Error in ==> Romberg at 13
T=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 13
T=h/2*(fun(a)+fun(b));
>> 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.subsref
Not enough inputs to inline function.
Error in ==> Romberg at 13
T=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 13
T=h/2*(fun(a)+fun(b));
▼优质解答
答案和解析
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.9666
T =
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
这里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.9666
T =
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
看了 matlab中 sqrt(1...的网友还看了以下:
n阶方阵A对任意n维向量x,满足x^TAx=0,充要条件为AT=-A;证明:充分性:f=x^TAx 2020-05-17 …
设f(x)在(-∞,+∞)内可导,且F(x)=f(x^2-1)+f(1-x^2),证明F'(1)= 2020-06-15 …
已知f(x-1)=x^2-4x,求函数f(x),f(2x+1)的解析式令t=x-1,则有:x=t+ 2020-06-17 …
已知f(根号下x+4)=x+8根号下x,求f(x平方)由于:f(√x+4)=x+8√x则设:T=√ 2020-07-11 …
matlab求解微分方程方程如下:x''(t)+x'(t)+x(t)-4*x(t)^2+3*x(t 2020-07-20 …
functionJ=Settingoptobjmodelling2(u)u1=u(1);u2=u( 2020-07-23 …
matlab里f=inline('sin(x)./x')中,那个点.为什么不加在括号里,第二个x后 2020-07-24 …
mathematica求解这个微分方程DSolve[{x[t]x''[t]+x'[t]^2-gx[ 2020-08-02 …
lim[x-x^2ln(1+1/x)](X趋近于无穷大)算的过程是这样lim(x→+∞)[x-x²l 2020-10-31 …
plot函数图像(不是散点图,是函数图像),已经有代码和图,如何能够出来颜色和不同的线条,求大神改代 2020-12-05 …