Programming and I
Sonntag, 4. August 2013
Matlab and running real-time experiments
Don't DO IT. That's all I can say. I think Matlab is a nice tool but not to create and run experiments. Especially not Real-Time ones where time and memory is really important. I still don't really understand why still so many scientists still use Matlab to program an experiment. I gave up on that and will concentrate more on either Python, Java or something else.
Donnerstag, 4. Juli 2013
MATLAB and Mex files
Hello fellows
I tried to write my own C/C++ codes for Matlab using the Mex compiler. My challenge was to use MinGW and third party libraries.
First Matlab's Mex compiler doesn't support that. After searching the web, everyone will find the GnuMex project which can be used to that. My main problem was and I still don't know why, I couldn't use my own programmed libraries. Somehow the -L and -l command doesn't work. The Mex compiler with the help of GnuMex couldn't help me. Maybe because I'm using a 64 bit Windows 7.
Anyway, here is my fix:
Just use your own familiar UI programming framework and the following information:
I tried to write my own C/C++ codes for Matlab using the Mex compiler. My challenge was to use MinGW and third party libraries.
First Matlab's Mex compiler doesn't support that. After searching the web, everyone will find the GnuMex project which can be used to that. My main problem was and I still don't know why, I couldn't use my own programmed libraries. Somehow the -L and -l command doesn't work. The Mex compiler with the help of GnuMex couldn't help me. Maybe because I'm using a 64 bit Windows 7.
Anyway, here is my fix:
Don't use them at all !
- Create a shared library project. The suffix should be changed to .mexw32.
- Use additionally to your include paths this one: C:\MATLAB\R2007b\extern\include. Change the path to your Matlab installation folder of course.
- Use additionally to your library paths this one: C:\MATLAB\R2007b\bin\win32. Don't use the on in this folder: C:\MATLAB\R2007b\\extern\lib\win32\microsoft. Here goes the same. Change the path to your Matlab installation folder.
- Add the following libraries to your project: mex, mat, mx. As you already know we don't have to use the prefix lib, for example libmex.dll. The GCC linker will do that for you. Just use it without the prefix and the -l command.
- Use for the C/C++ Preprocessor the define macro MATLAB_MEX_FILE
Freitag, 14. Juni 2013
Shared folders with VirtualBox
- Go to the VirtualBox VM menu ->Devices->Shared Folders ...
- Click the add folder button on the right side.
- On the "Select folder path" (SFP) select the folder on your host machine
- On the "Select folder name" (SFN) write the name you want to use later if you have to mount the drive.
- Click the OK button.
- Open a terminal window and run this command: sudo mount -t vboxsf SFN mountpath
- Now you should have access to your shared folder.
Abonnieren
Kommentare (Atom)