3

I am writing a code in MATLAB where I need to use a function called modwt which exist in two toolboxes that I'm using at the same time (Wavelet and WMTSA). The thing is that one version returns only one output and the other one returns three. How should I indicate which toolbox is the one that I need for a specific code. What I have done so far is trying to import the function using the import command:

import wmsta.dwt.modwt

Which gives me an error regarding that there is something wrong with my import.

Any help is much appreciated. Thanks

ahajib
  • 12,838
  • 29
  • 79
  • 120
  • Have a look at this [answer](http://stackoverflow.com/a/33776090/3599179), which deals with a very similar scenario. – codeaviator Feb 01 '17 at 23:28
  • Possible duplicate of [How to use MATLAB toolbox function which has the same name of a user defined function](http://stackoverflow.com/questions/33775645/how-to-use-matlab-toolbox-function-which-has-the-same-name-of-a-user-defined-fun) – Ander Biguri Feb 02 '17 at 08:42

1 Answers1

0

You shall prepend/put on the top (using the addpath function) the directory containing the function you want to call in MATLAB path. See https://www.mathworks.com/help/matlab/ref/addpath.html or use function handles as explained here https://stackoverflow.com/a/33776090/2043349

Community
  • 1
  • 1
Thierry Dalon
  • 779
  • 5
  • 21