使用 matlab 计算如下公式 :
在 matlab 中代码如下 :
// 方式一 :
cos(sqrt((1 + 2 + 3 + 4)^3/5))
// 方式二 :
cos(((1 + 2 + 3 + 4)^3/5)^0.5)
执行结果 :
>> Untitled
ans =
-0.0050
计算如下公式 :
是
函数 , 求
的自然对数 , 是
的反函数 ;
涉及到的函数 :
函数 : https://ww2.mathworks.cn/help/matlab/ref/sin.html
函数 : https://ww2.mathworks.cn/help/matlab/ref/tan.html
函数 ( 自然对数 ) : https://ww2.mathworks.cn/help/matlab/ref/log.html
的表示方法 ;
其它
函数 : 在 matlab 中 , log 函数表示以
为底的对数计算 ;
为底的对数 : https://ww2.mathworks.cn/help/matlab/ref/log10.html
为底的对数 : https://ww2.mathworks.cn/help/matlab/ref/log2.html
指数和对数运算参考 https://ww2.mathworks.cn/help/matlab/exponents-and-logarithms.html 页面 ;
上述公式对应的 matlab 代码如下 :
sin( sqrt(pi) ) + log( tan(1) )
执行结果 :
>> Untitled
ans =
1.4228
常用的数学公式对应函数 :