Toolbox have added. And the m-file of the function can be found buy 'Which'. However, ERROR: function need the Toolbox

조회 수: 1(최근 30일)
Toolbox can be found in the list from 'var'. I do not know why.


Sachin 2023년 3월 15일
I understand that you are getting error ‘function need the Toolbox’.
Here are some points that might be helpful to you:
  1. Did you install that toolbox when you installed MATLAB? If not, run the MATLAB installer again and only select the toolbox (Medical image toolbox) you want for installation.
  2. Change the directory to the parent folder of the file and try running it

Steven Lord
Steven Lord 2023년 3월 15일
In order to run a function from a toolbox two conditions must be true. I'm going to write in the context of a desktop installation of MATLAB, not MATLAB Online, since it looks like that's what you're using.
  1. The function must be installed as part of your installation. If it doesn't, there's no code present for MATLAB to run.
  2. The product that contains that function must be licensed, that is you must have a license for that product available to check out. If you don't, MATLAB is not allowed to run the code present in that file.
The output of ver will show you if condition 1 is satisfied. It does not say anything about condition 2. For that you'd need to check the output of the license function or (if you're using your company's or your educational institution's license) check with the person or group that maintains your licenses (usually someone in IT.) They can check that your license includes Medical Imaging Toolbox and that there is a license available for you to check out (i.e. that not all the licenses are currently in use.)


Find more on Introduction to Installation and Licensing in Help Center and File Exchange





Community Treasure Hunt

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

Start Hunting!

Translated by