请教MATLAB编程高手,我解决下面程序出错,但找不出原因,clear>> dsolve('Dv=m*g/k*s-m*g*exp(-k*s*t/m)/k*s','v(0)=0','t')ans =m^2*g/k^2*exp(-k*s/m*t)+m*g/k*s*t-1/k^2*g*m^2>> syms v s m k g t>> a=m^2*g/k^2*exp(-k*s/m*t)+m*g/k*s*t-1/k^2*g
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/23 20:22:50
请教MATLAB编程高手,我解决下面程序出错,但找不出原因,clear>> dsolve('Dv=m*g/k*s-m*g*exp(-k*s*t/m)/k*s','v(0)=0','t')ans =m^2*g/k^2*exp(-k*s/m*t)+m*g/k*s*t-1/k^2*g*m^2>> syms v s m k g t>> a=m^2*g/k^2*exp(-k*s/m*t)+m*g/k*s*t-1/k^2*g
请教MATLAB编程高手,我解决下面程序出错,但找不出原因,
clear
>> dsolve('Dv=m*g/k*s-m*g*exp(-k*s*t/m)/k*s','v(0)=0','t')
ans =
m^2*g/k^2*exp(-k*s/m*t)+m*g/k*s*t-1/k^2*g*m^2
>> syms v s m k g t
>> a=m^2*g/k^2*exp(-k*s/m*t)+m*g/k*s*t-1/k^2*g*m^2;
>> b=int(a,t)
b =
-1/k^3*g*m^3/s*exp(-k*s/m*t)+1/2*m*g/k*s*t^2-1/k^2*g*m^2*t
>> pretty(b)
3 k s t
g m exp(- -----) 2 2
m m g s t g m t
- ----------------- + 1/2 -------- - ------
3 k 2
k s k
>> clear
>> fun=inline('-1/k^3*9.8*27000000/56.52*exp(-k*56.52/300*t)+1/2*300*9.8/k*56.52*t^2-1/k^2*9.8*900*t)',','t');
fun=inline('-1/k^3*9.8*27000000/56.52*exp(-k*56.52/300*t)+1/2*300*9.8/k*56.52*t^2-1/k^2*9.8*900*t)',','t');
|
Error:")" expected,"identifier" found.
>> fun=inline('-1/k^3*9.8*27000000/56.52*exp(-k*56.52/300*t)+1/2*300*9.8/k*56.52*t^2-1/k^2*9.8*900*t)
fun=inline('-1/k^3*9.8*27000000/56.52*exp(-k*56.52/300*t)+1/2*300*9.8/k*56.52*t^2-1/k^2*9.8*900*t)
|
Error:Expected a variable,function,or constant,found "incomplete string".
请教MATLAB编程高手,我解决下面程序出错,但找不出原因,clear>> dsolve('Dv=m*g/k*s-m*g*exp(-k*s*t/m)/k*s','v(0)=0','t')ans =m^2*g/k^2*exp(-k*s/m*t)+m*g/k*s*t-1/k^2*g*m^2>> syms v s m k g t>> a=m^2*g/k^2*exp(-k*s/m*t)+m*g/k*s*t-1/k^2*g
试试这个:
fun=inline('-1/k^3*9.8*27000000/56.52*exp(-k*56.52/300*t)+1/2*300*9.8/k*56.52*t^2-1/k^2*9.8*900*t)','t');