Not Enough input Arguments

5 views (last 30 days)
Deniz S
Deniz S on 16 Jan 2016
Answered: Walter Roberson on 17 Jan 2016
Hi everyone, im trying to my final project and need a little bit help. İ looked below link and and downloaded it. in the winrar document there is a stft extension matlab file. i opened and runned it but in running it gives me "not enough input arguments" i tried everything and cannot do anything. how can i fixed it and whats the fixed version? thank you

Answers (2)

Jan
Jan on 16 Jan 2016
How did you run the function? By pressing the "Run" button in the editor? Then you call the function without inputs arguments.
The file "example.m" in this submission contains code, which explains how this function is called correctly:
% perform STFT
[s, f, t] = stft(x, wlen, h, nfft, fs);
Unfortunately the author did not apply the standard documentation style, such that "help stft" does not show the help section, but you can open the file in the editor and read the explanations.

Walter Roberson
Walter Roberson on 17 Jan 2016
You need to expand the entire .zip into a directory that is not otherwise used and which is not part of the MATLAB installation directories. Then in MATLAB, use the command pathtool to add that directory to the MATLAB path. After that you will be able to invoke stft at the command line or in your code the way Jan describes. The function requires input arguments so you will not just be able to click on Run or press F5 to run it.

Community Treasure Hunt

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

Start Hunting!