In the last couple days (since changing from Matlab 2017a pre-release to Matlab R2017a) I have been getting an error message when starting up Matlab, which states that the function or variable 'isTextStrict' is undefined:
Something similar occurs when actually calling the function contains, as for example in this small code snippet:
contains('test','test')
which throws the error
Undefined function or variable 'isTextStrict'.
Error in contains (line 37)
if ~isTextStrict(s)
And similarly:
Has anyone seen this problem before? This did not occur previously.
I would appreciate your help!
I had the same problem and reinstalling (after deleting both the problematic installation of R2017a and the pre-release version) solved the problem. I think I had left an open instance of the pre-release version when installing the R2017a, so that may be the problem.
Related
The weirdest thing happened, it seems as Matlab corrplot function just stopped working. I have a piece of code which always worked perfectly fine. Now the same code is throwing an error. When I try
corrplot(CE,'varNames',{'Diam.','Depth','Rad.','Thick','Thin'})
I get:
Undefined function 'corrplot' for input arguments of type 'cell'.
The function is not deprecated, meaning that probably your Econometrics Toolbox is no longer available. You can check for the available toolboxes in your MATLAB license by running ver. Additionally you should run
which corrplot
C:\Program Files\MATLAB\MATLAB Production Server\R2015a\toolbox\econ\econ\corrplot.m
To show you whether it is around somewhere. I reckon something went wrong with the toolbox installation, so you should check whether you still have a valid license and, if so, reinstal the toolbox.
You might also have a variable called corrplot (which corrplot tells you whether that is the case) although in my case the error then is:
CE = [1:10].';
corrplot=1;
corrplot(CE,'varNames',{'Diam.','Depth','Rad.','Thick','Thin'})
Error using subsindex
Function 'subsindex' is not defined for values of class 'cell'.
which corrplot
corrplot is a variable. % Not good, you didn't want that.
Clear the variable with clear corrplot and check where in your code it creates this variable and rename it.
I have a problem using SPM on Matlab. I have an m-file that I need to debug and I have not written.
This code is old and probably the error is hopefully given by the difference in syntax of the newer versions.
The error pops out using this function spm_get_files, originally present in the code. When changing this function to spm_get (I found that these two functions are supposedly equivalent) I get the following error:
Error using spm_get (line 1726)
Illegal Action string
Error in suj6 (line 46)
Fr3 = spm_get('/home/***/folder','a3*093.img');
where '/home/***/folder','a3*093.img' is the directory of the input files I want to analyze. These are fMRI scans.
My Matlab version is 9(R2016a) and the SPM is SPM12. (The code is old and was originally written in SPM99)
Anyone can help me out?
Thank you!
spm_get_files is basically just this one line of code:
varargout = {spm_get('Files',varargin{:})};
Clearly if you would like to switch back to using spm_get, you need to explicitly add 'Files' as the first argument.
I am trying to run Kevin Murphy's Bayes Net Toolbox in Octave and encountering some problems. It doesn't help that I'm a novice at Bayesian networks, Matlab and Octave.
This toolbox was originally written for Matlab. There is a large test file called test_BNT.m which runs through all the functionality in the toolbox. Most of the error messages relate to the difference between & and && in Matlab and Octave. This is easy to fix. However, I've now come across a new problem and I don't know what to do about it.
For instance, the qmr1.m script creates an instance of the pearl_inf_engine class, sets some of the member member variables and passes the instance of the class to another function. Later on, the member variables are accessed again in a different script (parallel_protocol.m). But when this happens, the following message appears:
error: invalid index for class
error: evaluating argument list element number 1
It seems that from one script to another, it has forgotten that the class has any member variables and gives the invalid index message when you try to access them.
Is this a common error with an easy solution? Is something wrong with the path or working directory? Maybe someone else has already converted the BNT to octave and knows what to do?
Edit
I was able to get past this error message. The trick was to read the installation instructions (haha) and run addpath(genpathKPM(<BNT base directory)). genpathKPM.m is a script includes in BNT which adds all the required directories to the path.
After doing this, run test_BNT.m and change & to && and | to || at each line where it gives a warning. This will clear up most of the errors.
However, I'm still unable to run mpe1.m, mp2.m, mildew1.m and some others. The new error message I'm stuck on is:
error: invalid empty index list
error: called from:
error: C:\FullBNT-1.0.7\bnt\BNT\inference\static\#var_elim_inf_engine\find_mpe
.m at line 63, column 5
on this line of code:
eval(['sCPT.T(', sargs, num2str(jj), ')=0;']);
If I can get all the scripts to work, I'll post an answer here with the steps I took to do it.
Edit 2
I was able to get past the problem in the previous edit. Replace
eval(['sCPT.T(', sargs, num2str(jj), ')=0;']);
with
eval(['sCPT.T(', sargs, sprintf('%d',jj), ')=0;']);
The next problem is identical. Just replace num2str in the same way.
This file was apparently contributed by a user of BNT, and not written by the original author. Using eval kind of a hack, I think. A better fix would be to just rewrite the code so it doesn't use eval at all.
There is one more error in draw_graph.m, which was apparently also an outside contribution to the project. I just commented out the call to that function since I'm not interested in drawing graphs right now. After doing this, and continuing to fix shortcircuit operators, all of the tests in test_BNT.m will run.
Still, I won't create an answer for this until I can get draw_graph.m to run, too.
As a significant amount of time has passed, and the answer to the core problem was provided in the question, I will post it here so it will not stay listed as unanswered:
tl;dr: Change a few operators, solve the remaining bugs specified below, and everything works except the drawing of graphs.
Edit
I was able to get past this error message. The trick was to read the
installation instructions (haha) and run addpath(genpathKPM(<BNT base
directory)). genpathKPM.m is a script includes in BNT which adds
all the required directories to the path.
After doing this, run test_BNT.m and change & to && and | to
|| at each line where it gives a warning. This will clear up most of
the errors.
However, I'm still unable to run mpe1.m, mp2.m, mildew1.m and
some others. The new error message I'm stuck on is:
error: invalid empty index list
error: called from:
error: C:\FullBNT-1.0.7\bnt\BNT\inference\static\#var_elim_inf_engine\find_mpe
.m at line 63, column 5
on this line of code:
eval(['sCPT.T(', sargs, num2str(jj), ')=0;']);
If I can get all the scripts to work, I'll post an answer here with
the steps I took to do it.
Edit 2
I was able to get past the problem in the previous edit. Replace
eval(['sCPT.T(', sargs, num2str(jj), ')=0;']); with
eval(['sCPT.T(', sargs, sprintf('%d',jj), ')=0;']);
The next problem is identical. Just replace num2str in the same way.
This file was apparently contributed by a user of BNT, and not written
by the original author. Using eval kind of a hack, I think. A better
fix would be to just rewrite the code so it doesn't use eval at all.
There is one more error in draw_graph.m, which was apparently also
an outside contribution to the project. I just commented out the call
to that function since I'm not interested in drawing graphs right now.
After doing this, and continuing to fix shortcircuit operators, all of
the tests in test_BNT.m will run.
I am having this error in Matlab (R2009a) and I try to find a solution for it with no success, this error shouldn´t exist since I am using a source code that I downloaded hence it should be working fine.
Any idea why is not working?
Error message:
??? Undefined function or method 'fittype' for input arguments of type
'char'.
Error in ==> ChIPnorm at 132 ft_ = fittype('smoothingspline');
Thank you!
Probably you didn't install the Curve Fitting Toolbox.
Or maybe the function was added after R2009a (I could not check the documentation for that version, but I can tell you on R2010a is available).
I am a student who is envolving in a research about robust visual tracking.
And these days ,I had met a problem in my study.
The teacher gave me a project of matlab code about the research, when I try to run this code, and the program error is as follows:
??? Attempt to execute SCRIPT mexLasso as a function:
F:\L1_Tracking_standard_car\mexLasso.m
Error in ==> L1Tracking_release at 95
c = mexLasso(Y(:,i), [A fixT], param);
Error in ==> demo at 46
tracking_res = L1Tracking_release( s_frames, sz_T, n_sample, init_pos,
res_path, fcdatapts);
When I go to the program tracking, I found that mexLasso function does not exist, Only get an empty mexLasso.m file and a mexLasso.mexw32 files.
My OS version is Windows 7 64bit,and the matlab is matlab 7.12.0 r2011a
Does anybody here knows the causes of my problem?
Anymore, I wonder if anybody knows who has the source code of the binary file mexLasso.mexw32.Because I thought that if I can get the source code of the file mexLasso.mexw32,then I could compile its 64 bit version myself.(I doubt that my os could not recognize the .mexw32 file.)
I hope my express clear enough to let you come to help me ,thanks a lot!
I think your analysis is basically correct - mexLasso is intended to be a MEX function, but MATLAB is finding only mexLasso.m which presumably contains help text. Unfortunately, the error you're getting isn't terribly helpful. As I see it, you have two options:
Obtain the source code for mexLasso and recompile on WIN64
Run the WIN32 version of MATLAB on your WIN64 machine
the function mexLasso comes from the SPAMS toolbox
http://www.di.ens.fr/willow/SPAMS/.
You can find the sources there and compile the mex file corresponding to your OS.
First, you need to find mexLasso.cpp file in http://spams-devel.gforge.inria.fr/downloads.html as Marial has already mentioned.
Then you can find and download the recent version of SPAMS.
A following stage is just to execute compile.m file on your MATLAB.
Finally you can find mexLasso.mexw64 in the build folder.
Good luck.