How to check the algorithm of the internal functions?

15 次查看(过去 30 天)
Hello,
I am trying to figure out the internal algorithm of "stft()". I typed "edit stft" at command window. Then I got the whole script of "stft()". However, there is another internal function called "computeDFT" (as showed in the picture 1). With the help of the command "edit computeDFT" I can not get access of this function (as showed in the picture 2). Does anybody know how to check the whole script of the function "computeDFT()" here?
(picture 1)
(picture 2)
Many Thanks!
Yuantong
  5 个评论
Yuantong Li
Yuantong Li 2020-12-21
By right klicking on "computeDFT" I got the code I wanted. Thanks for your all helping!

请先登录,再进行评论。

采纳的回答

Steven Lord
Steven Lord 2020-12-20
computeDFT is a private function in the same directory as the stft.m file. As such it is intended only be called by code in that same directory. If you select the call in that file, right-click on it, and select to open the file MATLAB will look for that function "in the context of stft" which is in the directory that can access the private function.
If you were hoping to call computeDFT in your code that is not possible unless it is in the toolbox directory, and I strongly recommend against you putting your own code in the toolbox directory (or indeed any directory under matlabroot.) This private function is not intended to be called by users directly.
  1 个评论
Yuantong Li
Yuantong Li 2020-12-21
Thank you very much! Right klick on "computeDFT" --> "open "computeDFT"" --> I got the script!

请先登录,再进行评论。

更多回答(0 个)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by