Why can't I access Toolbox functions

I have searched the usual channels and not found an answer. I am trying to access functions in the Image Processing Toolbox but they are undefined.
Other answers on here have led me to do some checks and I have found:
1) The toolbox is installed.
2) I have a licence for it (through my university) and I am logged into my account. I have checked this by looking at the toolboxes included as part of my university licence as well as checking from the command window using --- license checkout Image_Toolbox --- and received ans = 1
3) The addon is enabled.
I have also checked for and run updates.

11 commentaires

Stephen23
Stephen23 le 18 Nov 2018
Modifié(e) : Stephen23 le 18 Nov 2018
"The toolbox is installed. "
How are you checking this? Have you tried calling which with some of the main functions in that toolbox? Have you checked the Search Path? Did you rehash the toolbox cache?
Walter Roberson
Walter Roberson le 18 Nov 2018
what shows up when you use "which" to ask about them ?
Have you done
rehash toolboxcache
after you install them ?
ChiPhi85
ChiPhi85 le 18 Nov 2018
I checked it is installed by using 'ver' and Manage Add-Ons. Using 'which' on some functions returns a file path (for example imread and colorbar) but the functions I am trying to use (drawrectangle and drawcircle) are not found.
I haven't tried rehash toolboxcache, what does this do?
As an aside, how do you do inline code blocks such as the 'which' above?
Stephen23
Stephen23 le 18 Nov 2018
Modifié(e) : Stephen23 le 18 Nov 2018
"...but the functions I am trying to use (drawrectangle and drawcircle) are not found."
Have you made any changes to the MATLAB Search Path? Or installed any third-party toolboxes that might have changed this Search Path?
"As an aside, how do you do inline code blocks such as the 'which' above?"
Select the text you want, click the M button (M for monospaced).
ChiPhi85
ChiPhi85 le 18 Nov 2018
This is a clean install of MATLAB so I haven't installed any third party toolboxes, although I guess the search path may have changed since installation. Is there a reason why it would find some functions that are part of the toolbox but not others?
Is it worth re-installing the image processing toolbox?
ChiPhi85
ChiPhi85 le 18 Nov 2018
I've checked the Image Processing Toolbox reference guide and drawrectangle and drawcircle are not listed, but they are in the user guide. Is it possible that they're not part of the toolbox but something else? This may sound trivial, but how do I find out how to include these functions? I came across them in the MATLAB documentation:
The reason I presumed it was part of the IPT is because it's listed at the side and as I said, it's in the user guide.
ChiPhi85
ChiPhi85 le 18 Nov 2018
Although....if I search the Add-Ons for this function it comes up as part of the IPT.
ChiPhi85
ChiPhi85 le 18 Nov 2018
I have remembered how I came across drawrectangle. It was from this page about imrect:
I actually have this function available to me but it says on that page that drawrectangle should be used instead. Is this likely an update issue? I have just run the updates so I'm not sure why that would be the case.
That function was introduced in R2018b, but for some reason, when you made up your post, you chose not to tell us what release you're using. If it's not a secret, could you do this and tell us what it says?
>> ver
You can remove your license number before you post what it says though.
Ah right. I didn't include the MATLAB version as I presumed it would be to do with the toolbox, rather than the MATLAB version and that running the update would deal with it. In all honesty, I have little experience with toolboxes, so apologies if this is all trivial. Anyway:
-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.4.0.949201 (R2018a) Update 6
Operating System: Microsoft Windows 10 Home Version 10.0 (Build 17134)
Java Version: Java 1.8.0_144-b01 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.4 (R2018a)
Simulink Version 9.1 (R2018a)
Bioinformatics Toolbox Version 4.10 (R2018a)
Control System Toolbox Version 10.4 (R2018a)
Curve Fitting Toolbox Version 3.5.7 (R2018a)
DSP System Toolbox Version 9.6 (R2018a)
Data Acquisition Toolbox Version 3.13 (R2018a)
Database Toolbox Version 8.1 (R2018a)
Image Acquisition Toolbox Version 5.4 (R2018a)
Image Processing Toolbox Version 10.2 (R2018a)
Instrument Control Toolbox Version 3.13 (R2018a)
MATLAB Compiler Version 6.6 (R2018a)
MATLAB Compiler SDK Version 6.5 (R2018a)
MATLAB Report Generator Version 5.4 (R2018a)
Optimization Toolbox Version 8.1 (R2018a)
Signal Processing Toolbox Version 8.0 (R2018a)
SimBiology Version 5.8 (R2018a)
Simulink Control Design Version 5.1 (R2018a)
Spreadsheet Link Version 3.3.3 (R2018a)
Statistics and Machine Learning Toolbox Version 11.3 (R2018a)
Symbolic Math Toolbox Version 8.1 (R2018a)
My aim is:
1) Have an image pop up
2) Allow user to draw a shape (rectangle/circle/freehand) - how I found drawrectangle
3) Save the coordinates of the shape for future use
Walter Roberson
Walter Roberson le 18 Nov 2018
The information you found about drawrectangle() is for R2018b; in R2018a you would still use the other function.

Connectez-vous pour commenter.

 Réponse acceptée

Akshay Khadse
Akshay Khadse le 20 Nov 2018
Modifié(e) : Akshay Khadse le 20 Nov 2018

0 votes

The drawcircle and drawrectangle were introduced in MATLAB R2018b. Usually, this information can be found at the bottom most part of the documentation page. You can confirm this from the following documentation links:
For MATLAB R2018a, you could use the imellipse and imrect. Please refer to the following documentation pages for more information:
Please take into account the following:
  1. It might be best to upgrade to MATLAB R2018b and use drawcirclre and drawrectangle as it is recommended to use these commands over imellipse and imrect in the above documentation.
  2. There are some differences in the working and application of the commands like the drawrectangle vs imrect and drawcircle vs imellipse.

Plus de réponses (0)

Catégories

Community Treasure Hunt

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

Start Hunting!

Translated by