MathWorks today announced Release 2012a (R2012a) of its MATLAB and Simulink product families. New in this release are the introduction of HDL Coder, which generates HDL code from either MATLAB or Simulink for prototyping and implementation on FPGAs or ASICs, and the launch of HDL Verifier, which replaces EDA Simulator Link and adds Altera FPGA hardware-in-the-loop support. R2012a also updates 77 other products, including Polyspace embedded software verification products.
MathWorks is the leading developer of mathematical computing software. MATLAB, the language of technical computing, is a programming environment for algorithm development, data analysis, visualization, and numeric computation. Simulink is a graphical environment for simulation and Model-Based Design for multidomain dynamic and embedded systems. Engineers and scientists worldwide rely on these product families to accelerate the pace of discovery, innovation, and development in automotive, aerospace, electronics, financial services, biotech-pharmaceutical, and other industries. MathWorks products are also fundamental teaching and research tools in the world's universities and learning institutions. Founded in 1984, MathWorks employs more than 2400 people in 15 countries, with headquarters in Natick, Massachusetts, USA. For additional information, visit mathworks.com.
MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand names may be trademarks or registered trademarks of their respective holders.
I need to profile my CUDA code from Matlab. I have been converting some of the matlab code to CUDA in order to increase performance. I have done this by calling a mexFunction which calls the CUDA. The matlab feval function doesn't provide enough control. I can run the mexFunction through VS to debug this, but i need to debug the kernel as well, as i believe this is were the issue is.
If what you need is to profile your performance and not the debugging functionality nSight also gives you, you can use the following trick I use to run the matlab program on the visual profiler without having to make an exe with a test main function:
I am using the feval CUDA API, so this has the added advantage of showing you what is it that Matlab is actually doing. I guess it should work when using MEX also, but never tried it. Let me know if it worked for the MEX files also.
The activity Profile CUDA Process Tree will profile the CUDA process and all children processes of the launched process. This is important as I think the default implementation of Matlab is to launch the 32-bit variant and if on a 64-bit system then launch the 64-bit executable so simply launching Matlab is not sufficient.
The NVIDIA Visual Profiler collects results by running the application multiple times. It does not support launcher applications. This may be overcome by directly launching the correct version of Matlab.exe. Due to the application replay mechanism you may be able to profile using the Visual Profiler if you can automate running your mexFunction. I have not tried profiling Matlab with the Visual Profiler but I know the Nsight team has tested this in the past.
It's a late answer, but I believe the cleanest, most Mathworks-approved and least invasive solution is to edit the .matlab7rc.sh script. This is a script used by the matlab script when you start MATLAB under UNIX-like systems. (See )
Copy that script (found under matlabroot/bin) to the root of your project, or to your home directory. Then tell MATLAB to first search in the system directories for the C++ libraries, instead of its own directories. On my system I changed line 191:
Then edit .matlab7rc.sh in matlabroot/bin. Delete in the same directory any mexopts.sh file. Restart Matlab. MEX your file from scratch (this will build a new mexopts.sh file with the new settings. Run it from Matlab console.
I have been following a tutorial on you tube on how to get your Arduino board recognized within MatLab. First I created 2 GUI buttons "ON" and "OFF" in order to switch pin 13's LED on and off. When I try and compile/run the .m file called "buttons" I keep getting all these errors:
I am working with an Arduino UNO R3, Windows 7 and MatLab 2012a. I have tried putting everything within the MATLAB path within "documents" but still the same errors. I also looked under ports and seen that my UNO is on "COM3". But it says the function "arduino" is undefined.
Thanks for the reply. It turned out that my ArduinoIO folder within my MATLAB folder was not on my MatLab path. I've now put the ArduinoIO folder on my path and moved my "buttons.fig" and "buttons.m" files within the folder and its working fine. And its working fine in the command window.
I shouldn't have to execute "make" or "mex -setup" at all. In addition, I need to put all files from libsvm-3.12/windows to my matlab folder directly. I hope some newbie as I can also benefit from my experience.
I was looking through the new features in the MATLAB 2012a release, and one thing that caught my eye the most was some face detection algorithms have been added. This is great because I get questions about it a fair amount. I am lending the blog to my friend and colleague, Bruce, to show you what is new in this area of MATLAB.
b1e95dc632