How to Convert a matlab .m extension file to hex file or c file?
Show older comments
I have done my programing code in comparing single image with multiple images and obtained the desired out put. Now i want to convert that matlab '.m' file code into Hex file or c file. so that i can start simulating the prototype. I have very short period of time so plz take some time in answering the question.
Thanks
15 Comments
Jan
on 25 Sep 2011
What do you expect as output of a conversion to a HEX file? This usually means that each 8 bit value of a data stream is converted to a 2 character hexadecimal string. But how yould this be helpful for "start simulation the prototype"?
pradeep
on 25 Sep 2011
Image Analyst
on 25 Sep 2011
Re: "I have very short period of time so plz take some time in answering the question." We also have very short time periods that we can answer questions, so I ask YOU to take some time in phrasing your question. I have no idea what you want other than maybe you want your computer to pronounce the filename through your speakers (if that's what "give me the output audio of the matched file name" means).
pradeep
on 25 Sep 2011
Jan
on 25 Sep 2011
At least I do not understand, because I do not know, what you exactly mean by "prototype". It is a good idea to avoid mentioning details, which do not have any connection to your problem. Neither sound, nor image comparison nor the filenames do matter. Does this summary match your need: "I have some M-files and want to convert them to C-code, such that it can be compiled by the XYZ-compiler"?
If so, does Wayne Kong's answer solve the porblem already? If not, what is missing?
pradeep
on 25 Sep 2011
pradeep
on 25 Sep 2011
Jan
on 25 Sep 2011
@Wayne: Sorry, of course Wayne King, not Kong. Not funny.
@Pradeep: If you cannot buy the Matlab coder, why do you want to do this in Matlab? Without having the necessary tools, you have to create the program in C.
What is an "chat option on this mathworks"? Do you want to call an employee of MathWorks by phone?
pradeep
on 25 Sep 2011
Walter Roberson
on 25 Sep 2011
There is no chat option on the MATLAB web site.
If you need to generate C code from your .m file, then MATLAB Coder is the only option I know of.
See also this older discussion: http://www.mathworks.es/matlabcentral/newsreader/view_thread/158966
pradeep
on 25 Sep 2011
Walter Roberson
on 25 Sep 2011
Sorry, No, that is not correct. "MATLAB Coder" is a new name for a continuation of older products; the new name (and capabilities) were introduced with the R2011a release, but it is still an option extra-cost (and fairly costly) toolbox.
pradeep
on 18 Oct 2011
Walter Roberson
on 18 Oct 2011
I have not heard that octave or scilab have advanced as far as having a coder, but I do not follow them so I do not know.
pradeep
on 19 Oct 2011
Accepted Answer
More Answers (2)
Daniel Shub
on 18 Oct 2011
0 votes
The big problem seems that you cannot afford the coder. I am assuming this is an academic project (but the strategy probably holds for commercial ventures). Can you (or your supervisor) bring in a collaborator who is willing to trade authorship or ownership stake for access to the coder?
Jeevan Kulal
on 14 Jan 2022
0 votes
hello,
i want to generate embedded c code from matlab code. plz help me
2 Comments
Walter Roberson
on 14 Jan 2022
https://www.mathworks.com/matlabcentral/answers/12091-difference-between-simulink-coder-embedded-coder-and-matlab-coder
Rik
on 14 Jan 2022
(this has also been posted as a separate question)
Categories
Find more on Convert Image Type in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!