f



converting c++ code to Matlab code using Matlab 9

im working on a project using matlab. i want to use some of the already writen codes in C++. i want to use these codes in my project rather than writing them from scratch. is there some way or a chunk of code that might convert C++ code to matlab code or a ".c" file to ".m" file. please if anyone knows do let me know at the earliest.thanks
0
fatima
10/11/2010 8:11:03 AM
comp.soft-sys.matlab 211266 articles. 22 followers. lunamoonmoon (257) is leader. Post Follow

1 Replies
2160 Views

Similar Articles

[PageSpeed] 27

"fatima " <fatima_naseem2002@yahoo.com> wrote in message <i8ugqn$e9p$1@fred.mathworks.com>...
> im working on a project using matlab. i want to use some of the already writen codes in C++. i want to use these codes in my project rather than writing them from scratch. is there some way or a chunk of code that might convert C++ code to matlab code or a ".c" file to ".m" file. please if anyone knows do let me know at the earliest.thanks

Hi, If the code is already written in C++, then make a self-contained function out of it and create a mex file. 

Wayne
0
Wayne
10/11/2010 9:18:03 AM
Reply:

Similar Artilces:

Converting Matlab code to C using Matlab Compiler
Hello All, Please can I get some guidance on how to Convert a structure from Matlab code to C code using Matlab Compiler. Kind regards Sammy ...

MATLAB algorithm to MATLAB function code or C code
hallo firends, Can any body help me write this below code into MATLAB object oriented code or C code form please? M=50; % total number of periods. (choose for 1s duration) f0 = 50; % fundamental AC frequency T0 = 1/f0; %fundamental AC period T = M*T0; %Time for M periods (integer M) N=30; % sample points per period. dt = T0/N; % Sample at N points per period (integer N > 20) t = dt*[1:M*N-1]; % Sampling time array A0=120/2; % amplitude of AC signal. Divide by 2 or maybe sqrt (2) ? AC=A0*sin(f0*t*2*pi); % create AC signal. DC0=50; % DC amplitude DC=DC0*ones(1,le...

converting c code to matlab code
can any one help me in converting c code to matlab code.is there any software for it. thanking you. pradeep wrote: > > > can any one help me in converting c code to matlab code.is there > any > software for it. > thanking you. Look up "MEX" and "Generic DLL" Otherwise, no. ...

Converting a matlab code to a c++ code
hi! The SUbject is my question ;-) How do i convert an existing matlab code into a c++ code ?? Thanks! S.D with a lot of manual work... Yair Altman wrote: > > > with a lot of manual work... no automatic commands ?? Sam Rens wrote: > > > hi! > > The SUbject is my question ;-) > How do i convert an existing matlab code into a c++ code ?? To do the job properly (i.e. C++ rather than C with // comments) the process is something like: 1) Create yourself a matrix class. 2) Add enough methods and overloads to be able to mimic ML behaviour. 3) Transcribe the code....

convert C code to matlab code
for (ix=0; ix< iNx; ix++) for (iy=0; iy< iNy; iy++) { fMeanIn += pfIm0[X(ix,iy)]*pfu[X(ix,iy)]; fNormalizationIn += pfu[X(ix,iy)]; fMeanOut += pfIm0[X(ix,iy)]*(1.0-pfu[X(ix,iy)]); fNormalizationOut += 1.0-pfu[X(ix,iy)]; } the above code is C code.... how to convert this into matlab code.... i'm getting error in pfIm0[X(ix,iy)].... please help me to solve it out... ...

How to convert Matlab code into C code
Hi I want to convert my matlab code into C code. Please let me know how to do this? I am also watching for any help manual regarding this. Regards Shailesh Patel ...

Matlab code to C code converter
Hi, Is there any method avilable to convert MATLAB code into C code for perticular application of ANN. Regards, Manoj Manoj wrote: > Is there any method avilable to convert MATLAB code into C code for > perticular application of ANN. Yes: use one or more humans to rewrite the code. If you are looking for automated methods, then it depends upon which Matlab version you are using, but chances are that if you are using a Matlab version old enough to be compilable to C then it probably doesn't support the Neural Network toolbox. Are you sure you need to convert...

how to convert Matlab code to C code
Hi everyone, Can any one tell me how to convert matlab to c?? Regards. On 5/8/2012 4:36 PM, WMS wrote: > Hi everyone, > Can any one tell me how to convert matlab to c?? > > Regards. http://www.mathworks.com/products/matlab-coder/ "MATLAB Coder™ generates standalone C and C++ code from MATLAB code" ...

converting matlab code to C code
when i tried to convert the matlab code into c code using matlab coder i got below mentioned error, I am using R2011b(7.13.0.534) my program uses image as an input parameter. ERROR: >> coder -build len.prj ??? This text contains non-empty top-level expressions. It appears to be a script. Error in ==> length_of_line Line: 1 Column: 1 Code generation failed: Open error report. CODE: I=imread('pic29rkey.jpg'); imshow(I);pause hold on [x,y] = ginput(2); line(x,y,'color','r','LineWidth',5); Ired_length = sqrt ((x(2)-x(1))^2 + (y(2)-y(1))^2); ...

How to convert matlab codes into C codes?
Hi, anyone knows if matlab offers such a function? Thanks. ...

coverse a Matlab.mdl into C / C++ code and how to use this code
Hello help, I am a dutch student which want to integrate a simply matlab.mdl in a C++ program. But how do I do that? I have one in and output. In the model there will be added a constant to this input. So its just a simple example to learn how to integrate generated code into C or C++. I did the same by labview and there was a clearly guide for doing this. Building DLLs in LabVIEW 6.x or later: <http://zone.ni.com/devzone/conceptd.nsf/webmain/5df85b448eb081d8862568ff006a0b20> Calling a DLL from Microsoft Visual C++ that Was Generated by LabVIEW 6i: <http://zone.ni.com/devzone/de...

Shall i use the misrosoft Visual c++ code from a m-file generated from matlab in Visual C++ with out matlab runtime environment
undefined ...

How to convert matlab code to c or cpp code?
Hi, I am basically a c programmer, and very new to matlab. Will the matlab compiler generate c/cpp equivalent code to matlab code? I tried with some of my files. Just it is generating a c file with mail and interanlly calling the matlab code. For example _retval = mclMain(_mcr_inst, argc, argv, "myFunction", 1); Where myFunction is the matlab file. I didn't observe any code of my function inside this c file. I tried to generate one static dll by using some files and came to know that i am not getting the entire source code for my files. Just getting the export file which gi...

Help me to convert the C++ code to Matlab code
Some one Help me to convert the following C++ code to Matlab code for(init x=-5; x++ ; x<=10) { if (x<=0) y=2; else y=3 * x; plot (x,y) } ...

Web resources about - converting c++ code to Matlab code using Matlab 9 - comp.soft-sys.matlab

PastBook’s Filepicker.io Integration Eases Process Of Converting Facebook Content To Books
PastBook , one of several companies that allow Facebook users to publish their content on the social network in actual books , announced the ...

Facebook No Longer Converting Groups Into Pages
Back when Facebook first launched Facebook Pages, many businesses and brands who had built up substantial audiences in their Facebook Groups ...

Zwartz Laminating-Converting B.V. on the App Store on iTunes
Get Zwartz Laminating-Converting B.V. on the App Store. See screenshots and ratings, and read customer reviews.


"Occupier" Thanked Former Soviet Citizen for "Converting" Him to Capitalism, Pro-Israel, Pro-USA - YouTube ...
May Day Demonstration on Union Square in New York City Zionism & Birth of Modern Israel in 1948: Former Soviet Citizen Pays Tribute to Ben-Gurion ...

Converting dry air to water: solution to Broken Hill's water crisis gains support
A one-man crusade by a Broken Hill resident to solve the historic town's water crisis by introducing air to water converters is gaining support. ...

Click go fears of converting print files
Is there a way to convert a print queue item to a .RTF or .PDF file? I like to save or email them. - The Sydney Morning Herald

Sudanese woman ordered to hang under sharia law for converting to Christianity gives birth
Khartoum, Sudan: A Christian Sudanese woman sentenced to hang for apostasy has given birth in jail, a Western diplomat said on Tuesday.

Imams warn against radicalism to Aboriginal inmates converting to Islam
The prison system has enlisted the help of ASIO to crack down on radicalisation behind bars amid revelations that Aboriginals are converting ...

Converting the world's companies one by one - The Science Show - ABC Radio National (Australian Broadcasting ...
Image: Trucks carrying logs make their way up a road in Jambi, Indonesia. A vast area of the Sumatran forest, and orangutan habitat, is being ...

Resources last updated: 2/3/2016 7:50:26 PM