i'm trying to use glmnet vignette in MATLAB R2016a on windows 10 (64bit). I downloaded the version from here. Every time that I try to use a function (like cvglmnet) MATLAB crashes.
The glmnet version for MATLAB was tested only on MATLAB 2013b (64-bit), but I wanted to know if someone was able to use it on other versions of MATLAB and how to do that. I think the problem is the mex file that maybe should be recompiled since the error on the MATLAB crash says
This error was detected while a MEX-file was running. If the MEX-file
is not an official MathWorks function, please examine its source code
for errors. Please consult the External Interfaces Guide for information
on debugging MEX-files.
but I don't know how to do that.
I solved the problem recompiling the Fortran files. To do that I installed Visual Studio 2015, then Intel Parallel Studio XE 2016 for Fortran (the 2017 version doesn't work) and then on MATLAB terminal I used:
mex glmnetMex.F glmnet.f
Related
I use Matlab 2012a while the Fortran compiler is VS2013 + Intel® Visual Fortran x15 in Windows 10. Unfortunately,my MATLAB version does not support my Intel Visual Fortran Composer for Fortran along with VS 2013. Is there a way I can edit the mex options so MATLAB recognizes the new compilers? Or do I have to move to the latest Matlab version(undesirable)?
One closely related thread on Matlab user support forum raised my hope to resolve this problem, but I don't quite understand how to adjust the xml file to my Fortran compiler (the compiler's path has already been added to the environment path). Could someone kindly explain the procedure in details?
I have a problem, I can not install the library LIBSVM (for the SVM training). I look this video: https://www.youtube.com/watch?v=Wz_4h_bH7-c
but when I type "mex -setup" Matlab shows to me an error: "Error using mex
No supported compiler or SDK was found. For options, visit
http://www.mathworks.com/support/compilers/R2014a/win64. "
Please, help to me
Thanks
You have to install a supported C/C++ for Matlab to run the make instruction (the make instruction compiles the LibSVM source code).
Download (and install) Microsoft Windows SDK 7.1, close and reopen Matlab and then run mex -setup to check that Matlab detects your compiler. Hope it does fix your problem.
Same story on Mac OS X by the way: you have to install XCode for Matlab to detect a supported C/C++ compiler.
I'm trying to setup the visual studio 2012 compiler with matlab 2013a 64 bits on a Windows 8 64-bits machine, so that I can run a matlab function inside a simulink simulation. I made the mex -setup and mbuild -setup as I found saying in the web, but when I run the simulation, I get an error
Unable to locate a C-compiler required by Stateflow and MATLAB Function blocks.
Use 'mex -setup' to select a supported C-compiler.
Does anyone have any idea of where could be the problem?
Thanks in advance.
This is a known bug (I'm guessing). See the workaround on the MathWorks website:
http://www.mathworks.co.uk/support/bugreports/931218
I am using Matlab R2013a. The problem appears when I try to use Simulink Coder to generate Visual C++ code.
I've got this error even though I have Visual Studio 2013 installed on my computer already. When I look at list of programs that are installed on my computer I see Visual C++ 2008, 2010 and 2012. When I type the command mex -setup Matlab just can see a compiler LCC. But I need a Visual C++ compiler (which , technically, I already have) seen by Matlab.
How can I do that? Isn't mex -setup the right code?
You need MATLAB R2014a since support for Visual C++ 2013 was not added until MATLAB R2014a.
As a workaround, you can use this or this FileExchange submission to add support for building MEX files using Visual C++ 2013 with earlier MATLAB version.
I am using Windows 7 64 bits. I need to do the mex -largeArrayDims *.c but it tells me that there is no compiler. I am trying to do this in R2010a.
I tried mex -setup but still it says there is no compiler. How can I fix this? Can you please help me? I downloaded Mingw-w64 from the project's SourceForge page (this was before the project moved to http://mingw-w64.org/) but I don't know how to use it. Any help would be really appreciated.
mingw is not supported by Matlab. You must use a compiler supported by them. I believe Visual Studio should be supported and I see no reason why it wouldn't work with the Express Editions, which are free.
EDIT
http://www.mathworks.com/support/compilers/R2010a/win64.html#simulink
You need a patch for Matlab 2010a to use Visual Studio 2010. Under "Notes for the Windows (64-bit) Platform", Read item two, it should explain how to get VC++ 2010 recognized by Matlab. Hope this helps!