I have been using LIBSVM in Matlab on Windows and Linux, and get different results. The Linux version just keeps restarting instead of iterating and gets really bad results.
I tried to recompile and did everything that was on the README file, any ideas what could be the issue?
Related
I have a .mex code that properly works on Matlab 2012b (32bit).
However, I would like to make it work also on Matlab 2019b (64bit).
When I run it in Matlab 2019, even though the directory is introduced in the path, the error that I get is:
Missing file directm.mex
Have somebody encountered this kind of problem?
Specifically, the toolbox is "forcefeedback toolbox"
https://de.mathworks.com/matlabcentral/fileexchange/4939-force-feedback-toolbox-for-matlab-simulink
Many thanks!
Your MEX-file is a 32-bit binary. You cannot combine it with a 64-bit binary (the newer MATLAB program). The only way to get this to work is to recompile the MEX-file with the newer MATLAB. Unfortunately it looks like this File Exchange submission doesn't come with the sources to the MEX-file. So you are, unfortunately, out of luck.
I do research in oil simulation, I normally use a simulator called Eclipse from a company called Schlumberger and I was able to use it from my scripts from Matlab using the following command.
% file name 'ICFM.DATA';
system(['eclrun',' eclipse ', C:Path\ICFM.DATA]); % Command to run ECLIPSE
Now I had installed a new Free simulator (OPM.org) in linux and I am using Octave for programming. but I am unable to find out how to run simulator from Octave.
The simulator can be run simply by writing
flow ICFM.DATA
and the results using a command
ecl_summary ICFM.DATA
I want to be able to run and get the results from with in Octave but I have not being able as in Matlab.
Any suggestions? someone?
Assuming both the flow and ecl_summary commands are on your system path (i.e. the "linux" path, not in octave), then it should simply be a matter of:
system('flow /my/path/to/ICFM.DATA');
system('ecl_summary /my/path/to/ICFM.DATA');
(where you should change /my/path/to with whatever path your data file is in).
I found that I am able to run the simulation using the syntaxes
unix('flow ICFM.DATA')
This is in Matlab R2017b for Ubuntu 16.04
Initially I got an error as the output was reporting:
....'GLIBCXX_3.4.21' not found
All the problem was due to a Matlab issue that was solved using the answer on
https://askubuntu.com/questions/719028/version-glibcxx-3-4-21-not-found
which was to type:
LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libstdc++.so.6" matlab
on the terminal.
I've recently installed mexopencv for MATLAB on my Windows 7 machine. I'm using MATLAB 2015a 32-bit (on a 64-bit machine). I followed the recommended installation steps (from a number of sources - I had compiler issues to start with) and eventually got it working. The final step in the process is running the following command in MATLAB:
mexopencv.make
This is fine and I've been using it happily ever since. However, whenever I restart MATLAB and run my code which uses mexopencv functions, I get the following:
Error using cv.undistort
Invalid MEX-file 'C:\mexopencv-master\+cv\undistort.mexw32':
C:\mexopencv-master\+cv\undistort.mexw32 is not a valid Win32
application.
After some investigation it seems the only way I can get around this is to run the following every time I restart MATLAB:
mexopencv.make('clean',true)
mexopencv.make
So this is essentially re-compiling the mex files every time I start MATLAB. This takes a good couple of minutes and is a real pain!
Is there some way to get around having to do this each time?
I was facing the same problem (needed to rebuild mexopencv every time). Some people said they solved this problem by setting system PATH but not in my case. Mine was solved by copying all opencv dlls to the same directory those compiled mex files are.
I´m trying to load libtiff 3.9.5 in MATLAB R2012a and the situation is: Matlab says I need a Compiler and Perl. I installed Visual Studio 2010 and perl 5.14.2. mex -setup says Compiler is ok but nothing about Perl. Running loadlibrary I got lots of errors ( input character not valid and unkown variable among them). I found that Matlab looks for shrlib.dll in Windows Systems so I get a libtiff.dll in the Internet, use it and nothing changes. Next I get Big TIFF libtiff 4.1 which has a libtiff.lib and no changes again. As I am new in Matlab I just can´t think of what to do anymore. So I ask if somebody will help me. Many thanks in advance and best regards.
P.S. I put libtiff folder in R2012a directory a made it Current Folder.
I seem to have wiped out my path environment variable a while back. I've been slowly restoring things. I have both MATLAB and the MATLAB compiler installed. DLL's I've created from the MATLAB compiler won't run because they can't find the MATLAB compiler runtime dlls. While I did find the particular files that are my immediate problem. I'm wondering if there is a MATLAB *.bat file or command I can type that will restore my path variable to what it was after MATLAB and the Compiler were installed. I'm hoping to forestall future problems.
In case it's version specific I'm running MATLAB R2010b, I'm running a 32 bit version on a 64 bit machine.
[Edit]
I thought I would add that the path I need for running the compiled version was:
C:\Program Files (x86)\MATLAB\MATLAB Compiler Runtime\v714\runtime\win32
With luck, that one along with the two suggested in the answer will get me back to the original state.
restoredefaultpath might recover your MATLAB installation. Consider the use of startup.m, in order to easily undo changes to your environment.
You want to have these two directories on the PATH (I think the order is important):
C:\Program Files\MATLAB\R2010b\runtime\win32
C:\Program Files\MATLAB\R2010b\bin
Obviously you need to adjust the path to match your setup and architecture (those are on a WinXP 32-bit)
If you have a current software maintenance contract for your MATLAB, it may well be that the easy thing to do is just upgrade to the next version of MATLAB since R2011a is out now (unless there is some compelling reason why you must develop on R2010b. Running the software installer should recreate the default environment for MATLAB. I am, of course, assuming that you have Administrator access on your PC and have permission to install software.