可以在不使用exp内置函数的情况下执行指数函数的MATLAB代码 [英] MATLAB code that can execute exponential function without using the exp inbuilt function

查看:194
本文介绍了可以在不使用exp内置函数的情况下执行指数函数的MATLAB代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我是MATLAB的新手,现在我遇到了一个问题。有谁知道可以在MATLAB中执行'exp'功能的代码?因为我不允许使用exp内置函数,而是我必须编写一个执行相同功能的代码





什么我试过了:



 Sum = Sum + sequence(jj)* exp(-2 * pi * j *(jj) -1)*(k-1)/ nfft),这是具有exp内置函数的方程式,我不应该使用它。是否有任何代码可以执行exp函数而不影响此等式的结果?提前谢谢你。

解决方案

你可能会使用泰勒系列,有人已经做了为e ^ x编写泰勒系列函数 - MATLAB答案 - MATLAB Central [ ^ ]。

Hello, I'm new to MATLAB and I'm facing a problem now. Does anyone knows the code that can do 'exp' function in MATLAB? Because im not allowed to use exp inbuilt function, but instead i have to write a code that do the same function



What I have tried:

Sum=Sum+sequence(jj)*exp(-2*pi*j*(jj-1)*(k-1)/nfft), this is the equation that has exp inbuilt function that im not supposed to use. Are there any codes that can do the exp function without affecting the results of this equation? Thank you in advance.

解决方案

You might use the Taylor series, has someone already did Writing a taylor series function for e^x - MATLAB Answers - MATLAB Central[^].


这篇关于可以在不使用exp内置函数的情况下执行指数函数的MATLAB代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆