When the use the following code
imshowpair(Image1, Image2,'montage');
The following error occurs
??? Undefined function or method 'imshowpair' for input arguments of type 'uint8'.
I am using MATLAB version R2010a.
Give me a solution.
imshowpair was introduced in image processing toolbox for MATLAB 2012a. So you could upgrade your MATLAB.
Related
I used svmtrain in MATLAB R2016a, but now I'm using MATLAB R2019a. When use svmtrain like before I get an error that svmtrain does not exist.
What function replaced svmtrain in R2019a?
svmtrain() was deprecated and removed from the toolbox, hence it no longer works in newer versions of MATLAB. The official replacement is a suite of functions. You'll have to select which one you need depending on the problem requirements.
For one class SVM, it is fitcsvm
there is two important function for classifiaction data in matlab. insted of svmtrain in older version of matlab we use fitcsvm() in 2020ver:
https://www.mathworks.com/help/releases/R2019a/stats/fitcsvm.html
and here is replaced for svmclassify:
https://www.mathworks.com/help/releases/R2019a/stats/classreg.learning.classif.compactclassificationsvm.predict.html
OK, I'm fairly new to the Matlab, and it's first time installing a custom toolbox. I'm using Matlab R2015a on 64-bit Windows machine and tried to install third-party toolbox. I used addpath C:\WhereToolboxUnpacked and then savepath
ver call shows that Toolbox is installed, however Matlab seem to cannot find a function from it! Simple example from here gives an error:
Undefined function 'model' for input arguments of type 'char'.
Error in run_my_model (line 10)
m = model('my_simple_rbc.model');
help model returns
help for xregdesign/model
It seems that this model is not from my installed toolbox.
I am trying to construct a decision tree. I tried using the fitctree function and wrote:
ctree = fitctree(TrainingX,TrainingY);
such that TrainingX is the input matrix and TrainingY is the target matrix. An error appears saying that:
Undefined function 'fitctree' for input arguments of type 'double'.
I don't know what is the problem and what should I do to solve it. Could you please help me?
The reason why it is undefined is because fitctree requires the Statistics Toolbox in MATLAB. If you don't have the Statistics Toolbox, you can't use this function and you're SOL. Sorry!
Even with the Statistics Toolbox, fitctree is only available for recent editions of MATLAB (R2014a+). Check the release notes on the Statistics Toolbox for more details: http://www.mathworks.com/help/stats/release-notes.html. Go to where R2014a is and fully expand out all of the facts by clicking on Expand All. Where you see "Functions for classification methods and clustering", you'll see an entry for fitctree there.
The only option would be to upgrade your version of MATLAB to at least R2014a or above.
Good luck!
I am trying to run a code which calls the function OLS. reg=ols(y,X). I am getting an error saying that ols is an undefined function for input of type double. Is ols a function in the econometrics toolbox or do we create a separate ols function? I have checked the working directory and the toolbox is added to the path. I don't know what the problem is.
I don't have ols either and I have the econometrics toolbox. I'm guessing you are looking for some functions in File Exchange, most likely the Toolkit on Econometrics and Economics Teaching.
I have recently installed matlab R2012a when i type ver i see
Computer Vision System Toolbox Version 5.0 (R2012a)
along with other toolboxes. I suppose this means that the toolbox is installed?
When i try to run
videoOut = insertObjectAnnotation( double(videoFrame), 'rectangle', bbox, 'Face');
Similar question "error in Undefined function 'insertObjectAnnotation' in matlab" suggested using double but when i run it i get
Undefined function 'insertObjectAnnotation' for input arguments of type 'double'.
So i run which insertObjectAnnotation after which i get 'insertObjectAnnotation' not found.
What does it mean and how should i solve this ?
The function insertObjectAnnotation was introduced to Matlab in R2012b. Therefore, it is not available in your version of Matlab.