**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
"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 c...

**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 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 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
...

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

**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 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"
...

**Convert Matlab code to C/Java code**Hi,
Is there any way i can convert a matlab code to c/java code ?
Reason: The programs written in MATLAB need matlab installed on the
host computer. I want to make my programs as platform-independent.
regards
Shivraman
You might have a look at the O-Matrix Development Kit,
http://www.omatrix.com/omrte.html
It enables you to create stand-alone distributions that do not require your
end users to have Matlab installed, or require you to pay any "per seat"
license fees.
Beau Paisley
www.omatrix.com
"Shivraman Giri" <shivramangiri@yahoo.NO.SPAM.com> wrote in message...

**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)
}
...

**Please tell me how to convert Matlab code to C code**I need the complete steps ....ASAP
Thank you
"Ranjana Karunesh" <karnaranjana@gmail.com> wrote in message <gd95jm$3m9$1@fred.mathworks.com>...
> I need the complete steps ....ASAP
> Thank you
Complete Steps:
Step 1) Create your own version of an mxArray struct.
Step 2) Write C routines to do all of the MATLAB operations on your struct.
Step 3) Get a C library to do all of the LAPACK and BLAS routines to link to.
Step 4) Write C routines for all of those MATLAB functions not found in Step 3.
Step 5) Write a parsing routine to convert MATLAB syntax to C syntax.
Ste...

**calling Matlab code from C/C++ code**Hi,
I am learning to call Matlab code from C/C++ code. Here are my
questions
(1)are using Matlab engine and converting Matlab code into a C or C++
shared library the only two ways?
(2) what's the difference between these two methods? Advantages and
disadvantages? In what case use which method is better?
Thanks and regards!
On Mon, 03 Aug 2009 10:33:00 -0400, Tim <timlee126@yahoo.com> wrote:
> Hi,
> I am learning to call Matlab code from C/C++ code. Here are my
> questions
>
> (1)are using Matlab engine and converting Matlab code into a C or C++
> shared library...

**M code into programming C code or MATLAB programming code**hallo firends,
Can any body help me write this below code into MATLAB object oriented 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,length...

**Matlab code to C-code**If I want to generate C-code from m-file not specifically
for embedded target, which tool can I use? As of I know
emlc converts embedded MATALAB code to C-code. Does the
Real-Time Workshop uses emlc? Please any one tell me how
can I convert my m-file (not only embedded m-file) to C-
code.
Hi Naveen,
i don't think you can do this. if you could, TMW would be
giving away the store! you can, however, use the MATLAB
Compiler to generate a DLL that you can call from C. MCC
will generate a little stub that you call. That stub will
call into the MCR (MATLAB Component Runtim...

**MATLAB code to C code**Hi all
I read a similar question posted by someone else but my situation is
slightly different.
I am porting some MATLAB code to C code. I need to find a way to read
jpeg images in C just as imread does in MATLAB. The problem is that I
have tried a number of C libraries, but they do not serve my purpose
completely. I want to read simple grayscale jpeg images into unsigned
interger arrays.
Can someone pls shed some light.
Thanks
Qaseem
...

**C code from MATLAB code**Hi
I have a complex algorithm that eventually will be encoded in C to
run on a DSP or Controller (e.g. Hitachi SH4). The present MATLAB
implementation under WINDOWS calls advanced standard MATLAB routines
such as fft, matrix factorizations, eigenvalue solvers, fmincon (for
nonlinear optimization subject to nonlinear constraints), and some
number theoretic functions. I figure that the transcription to an
optimized C code requires many months of hard labor. Before I embark
on this adventure, I would like to generate from my MATLAB code (as
easily as possible, i.e. as automatically as possible) ...

**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...

**Matlab face detection code to c/c++ code**hello guys...
I am in urgent need of something which can change my MATLAb code to C or C++ code. I have to run this C, c++ code in Code composer studio and feed the program into DSP emulator EVDM642. Code composer studio does not support MATLAB...
So, its important to convert the code into C or C++..
This is my semester project and I have to give the presentation on 18th november...or else I will be failed..
Please help me guys....Tell e something which changes MATLAb to C/C++.
Thanx in advance.
On 16 Nov., 05:42, "Tarun " <tarunsa...@gmail.com> wrote:
> hello guys...
>...

**How to transfer matlab codes into visual c++ or c codes?**Hi, Folks
I have written some matlab functions (Matlab 6.5), and I want to
change them into visual c++ or c codes then create a visual c++
project to use the generated c++ or c codes.(visual c++ 6.0).
Could anyone give me the full instructions on how to deal with it
because I have met some unresolved external symbol problems when
linking (use visual c++ 6.0).
Have I missed to include some lib files?
Thanks.
Hi,
Suppose you have an M-file mySquare.m:
function y = mySquare(x)
y = x*x ;
You'll create a dll file by using the command:
mcc -t -L C -W lib:mySquarelib -T link:lib mySquare.m...

**converting matlab code to c\c++**I tried the example in the site,creating a stand alone c file,
(fractals.m) using the matlab project wizard and it gave me this
warning:
---------------------------------------------
This is the output from running MATLAB Add-in.
Please close this window after viewing it.
--------------MCC/MEX BEGIN---------------
mcc -k "Z:\DROWSINESS\PROJECT\TRY_C\fractals\mcc.mak" -/n -B sgl -A
line:on -g libmmfile.mlib libmwsglm.mlib -vh
"Z:\drowsiness\project\try_c\fractals.m"
Compiler version: 3.0
Parsing file "z:\drowsiness\project\try_c\fractals.m"
(Referenced from: "...

**Converting MATLAB code to C/C++**Hi,
I have written an algorithm for a robot in MATLAB and found that the algorithm works fine. The MATLAB code contains about 13 M files each with one function. I would like to convert it into C/C++ so that the code can make my robot function. I heard that its possible to convert MATLAB code to C/C++ automatically using a feature in MATLAB.
I looked up online and found that the feature is available for MATLAB 6.5. I am currently using MATLAB 7.7.0.471 (R2008b) on a Linux (Ubuntu 8.04) system.
It would be great if someone could point me to the help pages providing instructions on how to go ...

**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...

**Converting Vbasic code to C code**
any good tool?
any response would be appreciated
--
Posted via http://dbforums.com
dominant wrote:
> any good tool?
>
>
>
> any response would be appreciated
>
Yes, generically it's called a programmer, sometimes referred
to as a software engineer or developer. Some are tools.
Seriously though, this is not a question about the standard C
programming language, hence off topic here.
Please RTFF.
--ag
--
Artie Gold -- Austin, Texas
"dominant" <member32241@dbforums.com> wrote in message
>
> any good tool?
>
It depends what you want...