f



C/C++ to matlab

Hello, I  have a code. I need to change that code for matlab. I am wandering if there is an article so I can read before start. Thank you
0
ongun (65)
10/5/2009 11:52:02 PM
comp.soft-sys.matlab 211265 articles. 25 followers. lunamoonmoon (257) is leader. Post Follow

8 Replies
1051 Views

Similar Articles

[PageSpeed] 50

"Ongun Palaoglu" <ongun@mac.com> wrote in message <hae0r2$erv$1@fred.mathworks.com>...
> Hello, I  have a code. I need to change that code for matlab. I am wandering if there is an article so I can read before start. Thank you

check matlab help and read mex file creation. its pretty simple to call c from matlab. 
0
10/6/2009 12:58:03 AM
"Maya " <priyaravi_22@yahoo.co.in> wrote in message <hae4mr$nf6$1@fred.mathworks.com>...
> "Ongun Palaoglu" <ongun@mac.com> wrote in message <hae0r2$erv$1@fred.mathworks.com>...
> > Hello, I  have a code. I need to change that code for matlab. I am wandering if there is an article so I can read before start. Thank you
> 
> check matlab help and read mex file creation. its pretty simple to call c from matlab. 

Dear Maya, I do not want to call the function. I want to change the language to Matlabs own language . 
0
ongun (65)
10/6/2009 1:17:21 AM
"Ongun Palaoglu" <ongun@mac.com> wrote in message <hae5r1$59l$1@fred.mathworks.com>...
> "Maya " <priyaravi_22@yahoo.co.in> wrote in message <hae4mr$nf6$1@fred.mathworks.com>...
> > "Ongun Palaoglu" <ongun@mac.com> wrote in message <hae0r2$erv$1@fred.mathworks.com>...
> > > Hello, I  have a code. I need to change that code for matlab. I am wandering if there is an article so I can read before start. Thank you
> > 
> > check matlab help and read mex file creation. its pretty simple to call c from matlab. 
> 
> Dear Maya, I do not want to call the function. I want to change the language to Matlabs own language . 

In any particular case, someone who knows both languages can do a reasonable job of hand-translating from C++ to MATLAB.  I do not know of any articles that will help you.  A program to do the job could be written, but the output would be less than perfect: either it would fail to translate something or it would make such ugly M code that you would not want to use it.
0
mckeeman1 (15)
10/7/2009 7:11:02 PM
I'm translating some C code to Matlab right now, and gotta tell you, something like a "C for Matlab users" would be sweet like this one for R:

www.math.umaine.edu/~hiebeler/comp/matlabR.pdf
0
dave45 (61)
10/7/2009 8:15:44 PM
We are planning to connect a webcam to matlab( we are going to make a motion detetction system on matlab), logitech's website there is a code which controls the motor of the webcam. which on is more usefull calling the function or changing the language to matlab?
0
ongun (65)
10/9/2009 9:35:02 PM
On 9 Okt, 23:35, "Ongun Palaoglu" <on...@mac.com> wrote:
> We are planning to connect a webcam to matlab( we are going to make a mot=
ion detetction system on matlab), logitech's website there is a code which =
controls the motor of the webcam. which on is more usefull calling the func=
tion or changing the language to matlab?

Check what toolboxes are available. Ask the manufacturer/vendor
of the camera if there are drivers available to link the camera
up through e.g. the instrumentation toolbox, or image aqcuisition
toolbox.

Rune
0
allnor (8509)
10/9/2009 9:40:12 PM
http://www.quickcamteam.net/documentation/how-to/how-to-control-pan-tilt-zoom-on-logitech-cameras/PTZ-1.1.zip


this is the file I want to call. 
0
ongun (65)
10/9/2009 9:44:02 PM
Ongun Palaoglu wrote:
> We are planning to connect a webcam to matlab( we are going to make a motion detetction system on matlab), logitech's website there is a code which controls the motor of the webcam. which on is more usefull calling the function or changing the language to matlab?

Hi Ongun,

The Image Acquisition Toolbox supports Pan, Tilt, and Zoom for at least 
some of the Logitech webcams through the winvideo adaptor:

http://www.mathworks.com/products/imaq/supportedio13875.html

To learn more about the toolbox, also see:

http://www.mathworks.com/access/helpdesk/help/toolbox/imaq/index.html?/access/helpdesk/help/toolbox/imaq/

Mark
0
mark.jones (55)
10/12/2009 2:18:10 PM
Reply:

Similar Artilces:

C/C++ in matlab and matlab in C/C++ ?
Is it possible to read C/C++ code in matlab and the other way around too? Hi, as long as C or C++ are written in text files you can edit them in the matlab editor. To see the special character of C or C++ coding language, in the editor go to menus: file>preferences>Edito/Debugger>language and on popup "Language" select "C/C++". This does not allow you to run the C/C++ code, just to view it i nicer way... regards, chris saneman <asdfsdf@asd.com> wrote in message <frl846 $f8i$2@news.net.uni-c.dk>... > Is it possible to read C/C...

methods to call matlab in C C++ and call C C++ in matlab
Hi, I am reading the help documents about how to program matlab and C C++ together and my questions are a little bit general. It seems that are several ways to call matlab in C C++ and another several ways to call C C++ in matlab. Please correct me if I am wrong or missing something when I try to list them. To call matlab code in C C++, are there two methods available? The first one is Matlab engine and the second one is to use MATLAB Compiler mcc to create C or C++ shared libraries from your MATLAB code. To call C C++ in matlab, are there also two methods? The first one is to call funct...

C/C++ in MATALB or MATLAB in C/C++?
Hi I've been asking on the net how to use MEX properly so that I can use C/C++ in MATLAB, but information is not forthcoming. There seems to be a lot on using MATLAB in C/C++ but not the other way around. I understand Mathworks is trying very hard to sell the Matlab Compiler, but even so, why is it SO hard to get information about MEX? Or is it that I've missed something very fundamental, meaning that I'm struggling over something that is actually quite easy? Any thoughts and info would be great. Thanks BullDog BullDog wrote: > Hi > > I've been asking on the net ...

EngSim: All Matlab features and functions. 2 to 20 Times Faster than MATLAB. Use the same programming syntax as MATLAB, ANSI C/C++, /C++. Good Graphics.
ENGSIM is an Engineering Simulation & Graphics Library for Microsoft Visual C++. It has all Matlab features and functions. 2 to 20 Times Faster than MATLAB. Very Easy to program. Use the same programming syntax as MATLAB, ANSI C/C++. Graphics Support is Very Good. Support Negative Indexing for Array/Matrix, Complex Array and Complex Matrix. Support Fix-point/Floating-point Communications Engineering and Signal Processing Simulation. Support Statistical Analysis. Support User- Defined Classes. Support User-Graphics Development ...

C, C++, C# and MATLAB Expert
Hello all, Hope you are good. I am a expert in C and MATLAB, Feel free to contact me with your queries: onlinerapidhelp@gmail.com and join the group: https://groups.google.com/forum/#!forum/onlinerapidhelp Special Discount to first 50 Clients. I am waiting to see you, Client satisfaction is my first priority and I'll never let you down. Regards Engineer MAK ...

matlab beginner: calling matlab from C/C++
I'm relatively new to the world of Matlab. I want to call my matlab own code from a C/C++ program on a machine with matlab installed. Do I need to compile the matlab code using matlab compiler tool or the matlab engine is enough for this? Thanks a lot for your help On Nov 28, 10:03 am, "Paeo Campigotto" <campigo...@dit.unitn.it> wrote: > I'm relatively new to the world of Matlab. > I want to call my matlab own code from a C/C++ program on a > machine with matlab installed. > Do I need to compile the matlab code using matlab compiler > tool or the matla...

vectorized computation in C++ such as those in Matlab (Matlab to C++)?
Dear all, Can C++/STL/Boost do the vectorized calculation as those in Matlab? For example, in the following code, what I really want to do is to send in a vector of u's. All other parameters such as t, l1, l2, l3, etc. are scalars... But u is a vector. Thus, t6 becomes a vector. t9 is an element-wise multiplication... The following code was actually converted from Matlab. If vectorized computation is not facilitated, then I have to call this function millions of times. But if vectorized computation is okay, then I can send in just a u vector with batch elements a time. I have man...

Conversion from MATLAB to C/C++ using MATLAB compiler
I am working on conversion of .m files to c/c++. I am using the MATLAB compiler version 3.0 and MATLAB version 6.5.1. There seem to be a few functions which do not seem to get converted. The error i got while using functions like TRAIN, NETWORK and INIT (all neural-networks related functions used in the general neural network programs, newpnn.m etc) is The MATLAB compiler does not currently support MATLAB object oriented programming and the functions TRAIN , NETWORK and INIT would produce a run-time error. Could anyone please tell me as to how i can circumnavigate this problem or solve this...

matlab beginner: calling matlab from C/C++ #3
I'm relatively new to the world of Matlab. I want to call my matlab own code from a C/C++ program on a machine with matlab installed. Do I need to compile the matlab code using matlab compiler tool or the matlab engine is enough for this? Thanks a lot for your help ...

matlab beginner: calling matlab from C/C++ #2
I'm relatively new to the world of Matlab. I want to call my matlab own code from a C/C++ program on a machine with matlab installed. Do I need to compile the matlab code using matlab compiler tool or the matlab engine is enough for this? Thanks a lot for your help ...

C/C++ and MatLab
I am trying to call and debug matlab code via C/C++. i am able to run the engdemo.c program but I cannot stop the debugger in a test MatLab file to see if this can be done. I would like the C/C++ program to spawn the MatLab environment so that I may have access to all the MatLab debugging tools but be able to read any inputs from the C/C++ calling function and return any modifications to those values back to the C/C++ function as well. I am running MatLab 6.5.1.199709 v 13. Does MatLab 7 have any added capability that I would need to do this? Reginald Robertson wrote: > > > I am tr...

Matlab to C/C++
Hello! I want to convert Matlab code to C or C++ (no problem). I use the command mcc -B cpplib:mfile mfile.m which creates the following files: 1) mfile.cpp 2) mfile.ctf 3) mfile.exports 4) mfile.h 5) mfile_mcc_component_data.c I suspect that it should also create at least one more file (.dll) but it doesn't... Also, when I type the command, the following message appears: Could not find the compiler "cl" on the DOS path. Use mbuild -setup to configure your environment properly. C:\PROGRAM FILES\MATLAB71\BIN\WIN32\\..\MEX.PL: Error: Unable to locate compiler. PS: I have Matlab 7...

Create (Matlab) object inside C/C++ and pass it to Matlab
I'm trying to create an object inside C++ and then pass it to Matlab via en= gPutVariable. It seems I can create a struct // Create a float array mxArray *acq_data =3D mxCreateNumericMatrix(0, 0, mxSINGLE_CLASS); float *data =3D (float *)mxCalloc(M*N, sizeof(float)); mxSetData(acq_data, data); mxSetM(acq_data, M); mxSetN(acq_data, N); // Convert to struct const char *fieldname =3D "data"; mxArray *acq_struct =3D mxCreateStructMatrix(1,1,1, &fieldname); mxSetField(acq_struct,i,"data",acq_data); // Convert to class ?? Does it work? if (j=3D=3D1...

Possible to execute a Objective C or C/C++ Code through MATLAB?
I have a Objective C Code which performs a certain function. I would like to run the code through MATLAB. If Objective C is not compatible with MATLAB and C or C++ is, then the code could be converted to C/C++. I am not a C/C++ person, so please do let me know if MATLAB is capable to handling this. Thanks, Nevine If you can call if from regular C code you can use a mex file. http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_external/f29502.html Stuart "Nevine Jacob" <nevinejacob1981@hotmail.com> wrote in message news:ef17b4e.-1@webx.raydaftYaTP... >I have a Objective C Code which performs a certain function. I would > like to run the code through MATLAB. If Objective C is not compatible > with MATLAB and C or C++ is, then the code could be converted to > C/C++. > > I am not a C/C++ person, so please do let me know if MATLAB is > capable to handling this. > > Thanks, > Nevine Thanks Stuart. Now I can concentrate on how to go about doing this. I shall go through the documentation and try them out. I am sure I will get stuck somewhere as I am really new to this. I shall get back when I get any doubt. Thanks again, Nevine Stuart McGarrity wrote: > > > If you can call if from regular C code you can use a mex file. > <http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_external/f29502.html> > > Stuart > "Nevine Jacob" <nevinejacob1981@hotmail.com> wrote in message...

How to pass C pointers when interfacing Matlab MCR from C/C++
We have a signal processing application for doing frequency analysis of acoustic signals. The original signal is captured in a C struct: -------------------------------------------- typedef struct _sig { unsigned long length; float *data; } Sig; -------------------------------------------- Typical length is 10M, so the size of the data is 10M*sizeof(float)=40M. We want to apply FIR filter on this signal using Matlab MCR. I have built a Matlab DLL using the deploytool from the Compiler toolbox. In the Matlab DLL there is Filt.m that includes somethin...

matlab for C/C++ programmer
I tried the example in this morning seminar, However, it doesn't work. I just copy the code into a C++ function and build it. It can't pass. The error information as follow: MatlabEng error LNK2019: unresolved external symbol _engPutVariable referenced in function "public: void __thiscall CMatlabEngDoc::matlab(void)" (?matlab@CMatlabEngDoc@@QAEXXZ) What happened? sien wrote: > > > I tried the example in this morning seminar, However, it doesn't > work. I just copy the code into a C++ function and build it. It > can't > pass. > > The error i...

Matlab for C/C++ programmers
well i attended the seminar this morning and found it really useful. so i decided to try the stuff out myself. I am using the same program that is provided in the slides of the seminar as below. #include "C:\MATLAB7\extern\include\engine.h" void main() { Engine *ep; double data_c[10] = {8,1,2,3,2,5,-1,7,8,3}; mxArray *data_ml; data_ml = mxCreateDoubleMatrix(1,10,mxREAL); memcpy((char *)mxGetPr(data_ml),(char *)data_c,10*sizeof(double)); ep = engOpen(NULL); // Transfer to MATLAB engPutVariable(ep,"data",data_ml); } everything seems to be working fine except th...

Matlab & C/C++
Good day everyone, i'm already developed a system in matlab's fuzzy environment and i wrote the Mfile.Which i later compiled using the matlab compiler into both c and c++ codes..after setting the linker options in the visual c++ environment, i get the error below ------ Build started: Project: Bio, Configuration: Debug Win32 ------ Linking... LINK : fatal error LNK1104: cannot open file 'C:\Bio\Bio.obj' Build log was saved at "file://c:\Bio\Bio\Bio\Debug\BuildLog.htm" Bio - 1 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ====...

Matlab to c/c++ translation
I've been working in Matlab for the past year and I need to translate my code to c/c++ to be able to run it on a cluster. What are my real options that would not give unexpected mistakes with the automatic translation. My c/c++ skills are not particularly developed. Thank you for your attention. Nuno. On Jun 1, 3:57=A0pm, "Nuno " <n.n...@ucl.ac.uk> wrote: > I've been working in Matlab for the past year and I need to translate my = code to c/c++ to be able to run it on a cluster. What are my real options t= hat would not give unexpected mistakes with the automatic t...

Convert C/C++ to Matlab
Dear all, I would like to convert c code into matlab to be used in a student project. Is there any converter, which I could use? flo Flop wrote: > > > Dear all, > > I would like to convert c code into matlab to be used in a student > project. > > Is there any converter, which I could use? > > flo You can compile it into a MEX or Generic DLL, and call it. But, if you want it in m-code, you will have to do it by hand. C and MATLAB are not very different. ...

MATLAB C/C++ Library
Hi, I have installed MATLAB7 which includes MATLAB Compiler. It's mentioned that the MATLAB Compiler now includes MATLAB C/C++ Math and Graphics Libraries. In my case, there is no directory called "cmath" and "cppmath" in $MATLAB/extern/examples/. That means it is not installed. Should I need a License for it or same license is applicable. Where to get these libraries? Any idea. Thanks & Regards, Ardhendu Hi Ardhendu, MATLAB Compiler 4 dosen't include MATLAB C/C++ Math Library. To know what version you have, type command in MATLAB Command Workspace: >&...

C/C++ Matlab library?
Hi, I just came to realize that Matlab is extremely slow for my data visualization code. But at the same time, I like the functionality that Matlab provides. I looked around and Mathworks has a c/c== Matlab graphics library package. Unofrtunately, it cannot be purchased for the student version of Matlab. Are there any other packages out there that I could use with my student version of Matlab? Thanks. ...

matlab c/c++ compiler
Hi, I'm student and i'm working on wavelet foveation, my first version of m filles takes more than 4 hours to calculate results using 512*512 image, i tried to use matlab c ++ compiler in order to optimise time calculation (making full or partial stend alone application), problem : i had a lot of warnings and errors ! my question is about efficient manuals or books about making stand alone applications using matlab compiler (with visual interfaces if its posible, generating mex files under linux or dll's under windows). Thanks. Marie. On Sat, 15 Nov 2003 11:49:24 +0...

MATLAB to C/C++ conversion
Hi. I would like to convert a short .m file to C or C++ code. I have MATLAB compiler version 4.6. I used the following commands: mbuild -setup mcc -c MyFunction.m I recived the following error messages: "??? Unable to determine application type, since no wrapper function was specified. Please use the -W switch or specify application type via - m or -l. Type 'mcc -?' for further assistance." "Error: File "MyFunction" is a script M-file and cannot be compiled with the current Compiler. You may be able to correct this by converting this script into a fu...

Web resources about - C/C++ to matlab - comp.soft-sys.matlab

Undocumented Matlab
Undocumented, unsupported and hidden features in Matlab

Matlab Upazila - Wikipedia, the free encyclopedia
... 23°21′N 90°42.5′E  /  23.35°N 90.7083°E  / 23.35; 90.7083 Coordinates : 23°21′N 90°42.5′E  /  23.35°N 90.7083°E  / 23.35; 90.7083 Matlab ...

Open Directory - Science: Math: Software: MATLAB
The MathWorks - Developers of MATLAB, Simulink and Stateflow. Offers products for data analysis, visualization, application development, simulation, ...

MATLAB Mobile on the App Store
Read reviews, compare customer ratings, see screenshots, and learn more about MATLAB Mobile. Download MATLAB Mobile and enjoy it on your iPhone, ...

The Smart Emergency Response System Using MATLAB and Simulink - YouTube
In the aftermath of an earthquake, every second counts for disaster victims. Imagine a system that can locate people quickly and help first responders ...

The A-Z of Programming Languages: MATLAB
What prompted the development of MATLAB?

Matlab: Invalid .NET Framework. Either the specified framework was not found or is not currently supported ...
If you are trying to compile Matlab into .Net framework, you might encounter this message, even though you have the .Net framework installed ...

Matlab edges closer to electronic design automation world
Matlab, one of the world's most widely used products for algorithmic development, has long occupied its own niche far removed from EDA and hardware ...

Can I/How do I use DMTCP with a parallel pool of MATLAB workers? · Issue #223 · dmtcp/dmtcp · GitHub
dmtcp - DMTCP: Distributed MultiThreaded CheckPointing matlab -nodisplay -r "parpool('local',4); parfor i=1:10, pause(1); fprintf('%i ',i); end; ...

Using MATLAB and SDR to Reverse Engineer 433MHz Messages
... so he focused on studying the methodology and the tools available for analyzing 433MHz RF transmission. He describes the process of using MATLAB ...

Resources last updated: 2/28/2016 5:56:14 PM