早教吧作业答案频道 -->其他-->
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...的网友还看了以下:
怎么求极限求(1+sqrt(x))^(1/sqrt(x))的极限我明白了,原来e的定义就是lim( 2020-05-14 …
Matlab 求值 fzero 第二个值怎么也求不出来 请大师帮忙clear>> x=[0:0. 2020-05-16 …
matlab中如何对一个三维图形进行截面?clearxm=2.5;ym=2.5;x=-xm:0.1 2020-05-16 …
matlab中的一道作图,我的代码是这样的:>>x=-2:0.1:2;y1=1/(sqrt(2*p 2020-05-17 …
y)(1/sqrt(pi)*exp(-x.^2)*1/sqrt(pi)*exp(-y.^2)).* 2020-05-23 …
[20分][高一不等式]已知a,b,m,n∈R+,设p=Sqrt(ab)+Sqrt(cd),q=S 2020-05-23 …
牛顿迭代f(x)=sqrt(x)x>=0牛顿迭代(1)f(x)=sqrt(x),x>=0-sqrt 2020-06-04 …
limit(x*(1+(sin(x)^2),x=infinity);limit(x*((sin(x 2020-06-09 …
求证:斐波拉契数列的通式为Fn=(((1+sqrt(5))/2)^n-((1-sqrt(5))/2 2020-07-23 …
pascal十分简单的sqrt问题sqrt(n)=sqrt(x)-sqrt(y)求解给出一个正整数 2020-08-02 …