Matlab中表达e的操作教程
时间:2022-10-26 17:30
最近不少伙伴咨询Matlab中表达e的操作,今天小编就带来了Matlab中表达e的操作教程,感兴趣的小伙伴一起来看看吧!
Matlab中表达e的操作教程
问题
打开Matlab之后,在命令行窗口中直接输入e,按回车键,可以看到显示未定义变量,如图所示:

e自然数
如果只表达e自然数,可通过exp(1)表示,在命令行窗口中输入,按回车键能看到e的数值接近2.7183,如图所示:

以e为底的对数函数
以e为底的对数函数表示,可通过log(n)表示,如在命令行窗口中输入log(10),按回车键得到结果2.3026,如图所示:

以e为底的指数函数
以e为底的指数函数。可通过 exp(n)表示,如在命令行窗口中输入exp(5)表示e的五次方,如图所示:

也可以验证一下以e为底的指数函数和对数函数表示形式,在命令行窗口中输入log(exp(1)),按回车键,能看到结果为1,如图所示:

继续在命令行窗口中输入log(exp(2)),按回车键,能看到结果为2,如图所示:

以上这里为各位分享了Matlab中表达e的操作方法。有需要的朋友赶快来看看本篇文章吧。