Hello to all Matlab developers,
I made several Matlab applications, but the main problem is the speed of execution. I heard that it is possible to implement Matlab code int C code for extra speed.
Has anyone had any success with this idea, and if so, what are the main steps and tools?
Kind regards,
Jean.
|
|
0
|
|
|
|
Reply
|
Jean
|
5/20/2010 12:50:07 PM |
|
Dear Jean!
> I made several Matlab applications, but the main problem is the speed of execution. I heard that it is possible to implement Matlab code int C code for extra speed.
>
> Has anyone had any success with this idea, and if so, what are the main steps and tools?
The first step of increasing the speed is finding the bottlenecks. It is very likely, that the lines of the program, which needs the longest time, can be accelerated by using improved Matlab coding.
After fixing a suffcient number of bottlenecks in Matlab, you can decide, if it might be helpful to rewrite some functions in C and compile them as Mex function. There are a lot of examples shipped with Matlab and in the FEX.
Good luck, Jan
|
|
0
|
|
|
|
Reply
|
Jan
|
5/20/2010 1:25:20 PM
|
|
Jean wrote:
> I made several Matlab applications, but the main problem is the speed
> of execution. I heard that it is possible to implement Matlab code int C
> code for extra speed.
>
> Has anyone had any success with this idea, and if so, what are the main
> steps and tools?
In Matlab 6, it was possible to compile Matlab in to C, but it is no
longer possible, except for Embedded Matlab and for the Real Time
Workshop Toolkit (and possibly Simulink, I'm not sure about that one.)
There is a deployment tool which is *called* a "compiler", but it just
makes an executable out of the files but keeps the same speed (and
sometimes slower.)
|
|
0
|
|
|
|
Reply
|
Walter
|
5/20/2010 2:30:13 PM
|
|
|
2 Replies
207 Views
(page loaded in 0.037 seconds)
Similiar Articles: Matlab code to C code converter - comp.soft-sys.matlabHi, Is there any method avilable to convert MATLAB code into C code for perticular application of ANN. Regards, Manoj ... MATLAB Vs C - comp.soft-sys.matlabHi, I am working on a project which involves large computations , right now I am using MATLAB but I want to improve computational efficiency. Some ... converting C/Visual BASIC code to MATLAB - comp.soft-sys.matlab ...I'm trying to convert some vendor provided C and/or Visual BASIC code into MATLAB, so that MATLAB can utilize a driver that can interface a camera. ... How to c the wavread function.. - comp.soft-sys.matlabHi all, Can i have your advise how can i c the background code of wavread function? As i wish to c how the sound data x is retrieved from the wa... C++ compiler for mex - comp.soft-sys.matlabHello all, I am trying to mex a C++ file but it seems that MATLAB does not recognize my C++ compiler. I have Visual Studio C++ 2010 on my machine. ... mex vs matlab code for solving wave equation - comp.soft-sys ...I need to solve the standard acoustic wave equation in 2D: u_tt = c(x,y)^2 (u_xx + u_yy - f) with absorbing boundary conditions. Have written code in ... Convert C array into mxArray Type - comp.soft-sys.matlab ...Hello, I am trying to send data from C++ using Matlab's engine libraries. This might be fairly a simple question but I couldn't figure it out. ... Calling MATLAB from Visual Studio in a C program - comp.soft-sys ...MATLAB R2010b, Visual Studio 2008 Pro, 64-bit Windows 7 What are the necessary settings in VS to call Matlab from a C program? Compiling from th... Compiling MCR C++ dll with VS2010 - comp.soft-sys.matlab ...Are you able to make the code to work? I am running into mxCreateString returning NULL all the time... Chee Pin MEX ERROR: "Could not find the compiler "cl" on the DOS path ...Hi I am trying to compile some c++ code into a MEX in MATLAB 2010a under Windows 7 64 bit. I get the following error: --- Error: Could not f... MATLAB-to-C translation, part 1: Pitfalls and problemsPart 1 of this 3-part series looks at the basic problems of translating basic MATLAB functions to C. One-button MATLAB-to-C conversion - electrical engineering ...In the past, converting MATLAB algorithms into C code required manual translation--a slow, error-prone process. Now, you can generate C automatically using Catalytic MCS. 7/26/2012 9:33:59 AM
|