How to call a program in C from Matlab
Afficher commentaires plus anciens
I used to call a program in C to change parameters in a camera, since the product came with examples in this language.But for sake of automation it would be more efficient do it all from a main program in Matlab.-The key is how to pass the values to the functions and make that the program in c read the values from the functions in my "m" file.Command System works for me, but if there is another way to dothis...I appreciate a clue
Réponses (1)
Kaustubha Govind
le 26 Mar 2012
1 vote
4 commentaires
Warren
le 26 Mar 2012
Geoff
le 27 Mar 2012
Wrapping your camera control code with MEX should not be a problem if you are familiar with C. You simply create a C source file with the MEX entry function, #include your camera-control stuff in that file, and translate the supplied MatLab parameters into their C equivalent. There is a lot of MEX example code on the web that gives you the basic MatLab API calls. From there, it's just ordinary C.
Jan
le 27 Mar 2012
@Warren: The Mex-gateway is the best solution. If this interface is "overwhelming" for you, this forum is a good location to post your trials and ask specific questions about the mex<> and mx<> commands.
Kaustubha Govind
le 27 Mar 2012
I agree with Geoff and Jan!
Catégories
En savoir plus sur Deep Learning Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!