【MATLAB】数值运算 ( 数值运算示例 |
您所在的位置:网站首页 › 指数运算常用公式 › 【MATLAB】数值运算 ( 数值运算示例 |
文章目录一、数值运算 1二、数值运算 2三、常用的数学公式对应函数一、数值运算 1 使用 matlab 计算如下公式 : \cos \bigg(\sqrt{ \cfrac{(1 + 2 + 3 + 4) ^3}{5} }\bigg)在 matlab 中代码如下 : 平方根 : https://ww2.mathworks.cn/help/matlab/ref/sqrt.html幂运算 : https://ww2.mathworks.cn/help/matlab/ref/mpower.html余弦函数 : https://ww2.mathworks.cn/help/matlab/ref/double.cos.html代码语言:javascript复制// 方式一 : cos(sqrt((1 + 2 + 3 + 4)^3/5))代码语言:javascript复制// 方式二 : cos(((1 + 2 + 3 + 4)^3/5)^0.5)执行结果 : 代码语言:javascript复制>> Untitled ans = -0.0050![]() ![]() 计算如下公式 : \sin(\sqrt{\pi}) + \ln (\tan (1))\ln x是 \log_ex函数 , 求 x的自然对数 , 是 e^x的反函数 ; 涉及到的函数 : 平方根 : https://ww2.mathworks.cn/help/matlab/ref/sqrt.html\sin函数 : https://ww2.mathworks.cn/help/matlab/ref/sin.html \tan函数 : https://ww2.mathworks.cn/help/matlab/ref/tan.html \log函数 ( 自然对数 ) : https://ww2.mathworks.cn/help/matlab/ref/log.html 常用的常量和测试矩阵 : https://ww2.mathworks.cn/help/matlab/constants-and-test-matrices.html , 在该文档中有 \pi的表示方法 ; 其它 \log函数 : 在 matlab 中 , log 函数表示以 e为底的对数计算 ; log10 表示以 10为底的对数 : https://ww2.mathworks.cn/help/matlab/ref/log10.html log2 表示以 2为底的对数 : https://ww2.mathworks.cn/help/matlab/ref/log2.html 指数和对数运算参考 https://ww2.mathworks.cn/help/matlab/exponents-and-logarithms.html 页面 ; ![]() 上述公式对应的 matlab 代码如下 : 代码语言:javascript复制sin( sqrt(pi) ) + log( tan(1) )执行结果 : 代码语言:javascript复制>> Untitled ans = 1.4228![]() 常用的数学公式对应函数 : 算数运算 : https://ww2.mathworks.cn/help/matlab/arithmetic.html三角函数 : https://ww2.mathworks.cn/help/matlab/trigonometry.html指数与对数 : https://ww2.mathworks.cn/help/matlab/exponents-and-logarithms.html特殊函数 : https://ww2.mathworks.cn/help/matlab/special-functions.html离散数学 : https://ww2.mathworks.cn/help/matlab/discrete-math.html |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |