
求大神帮忙,关于MATLAB的一道题,题目看不懂,帮看看要求做什么,
5.17WriteasingleMATLABfunctionhyperbolictocalculatethehyperbolicsine,cosine,andtangen...
5.17 Write a single MATLAB function hyperbolic to calculate the hyperbolic
sine, cosine, and tangent functions as defined in the previous problem.The
function should have two arguments. The first argument will be a stringcontaining the function names 'sinh', 'cosh', or 'tanh', and the second
argument will be the value of x at which to evaluate the function. The file
should also contain three subfunctions sinh1, cosh1, and tanh1 to perform
the actual calculations, and the primary function should call the proper
subfunction depending on the value in the string. [Note: Be sure to handle the
case of an incorrect number of arguments, and also the case of an invalid
string. In either case, the function should generate an error.]
实在看不懂是什么意思 展开
sine, cosine, and tangent functions as defined in the previous problem.The
function should have two arguments. The first argument will be a stringcontaining the function names 'sinh', 'cosh', or 'tanh', and the second
argument will be the value of x at which to evaluate the function. The file
should also contain three subfunctions sinh1, cosh1, and tanh1 to perform
the actual calculations, and the primary function should call the proper
subfunction depending on the value in the string. [Note: Be sure to handle the
case of an incorrect number of arguments, and also the case of an invalid
string. In either case, the function should generate an error.]
实在看不懂是什么意思 展开
1个回答
展开全部
5.17写一个单独的MATLAB双曲函数计算双曲正弦,余弦,和双曲正切函数。
函数应该有2个参数。第一个参数是一个函数名为字符串:'sinh”,“cosh”,“tanh”,第二
参数将是计算函数在该点的值。文件还应该包含三个子功能sinh1,cosh1,和tanh1执行实际的计算,和主要功能应该调用适当的子功能取决于字符串的值。[注:一定要处理不正确的参数数目,以及无效的字符串。在出现错误的情况下,该函数应该产生一个错误]。
函数应该有2个参数。第一个参数是一个函数名为字符串:'sinh”,“cosh”,“tanh”,第二
参数将是计算函数在该点的值。文件还应该包含三个子功能sinh1,cosh1,和tanh1执行实际的计算,和主要功能应该调用适当的子功能取决于字符串的值。[注:一定要处理不正确的参数数目,以及无效的字符串。在出现错误的情况下,该函数应该产生一个错误]。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询