XIAXUETIAN 发表于 2014-5-22 20:43

新人求助(下面的程序那里有错)

function v = freefallvel(t,m,cd)
% freefallvel : bungee velocity with second-order drag
% v=freefallvel(t,m,cd) computes the free-fall velocityof an object with
%                       second-order drag
input :
% t = time (s)
% m = mass (kg)
% cd = second-order drag coefficient (kg/m)
output :
% v = downward velocity (m/s)  g = 9.81;     
% acceleration of gravity   v = sqrt(g*m/cd)*tanh(sqrt(g*cd/m)*t)
end



madio 发表于 2014-5-23 13:48

这是一个函数的定义,但是里面的代码全部都被注释了呀,你要怎么实现?

山林隐逸 发表于 2014-5-23 14:25

对啊。LZ的代码每行都是注释。。怎么运行。。把每行的% 去掉。。

jsjyxxgcxy 发表于 2014-5-24 21:31

你的这个代码要实现什么功能呢?能详细点不
页: [1]
查看完整版本: 新人求助(下面的程序那里有错)