I cant make coder in my MATLAB 2013

Hello all, I am trying to do coder in matlab 2013 to C. And every time when i load my file omg.m befor i start to build its say that:The script omg.m cannot be used with code generation tools. Only functions are supported. In this file i put all the options to play some audio file like wav file.. Some one can offer me a good idee to solve this?

Antworten (1)

Kaustubha Govind
Kaustubha Govind am 6 Aug. 2013

0 Stimmen

You need to add the function header at the top of your file to make it a function instead of a script. See Scripts vs. Functions for more information. Scripts are not supported for code-generation, but functions are.

3 Kommentare

123123
123123 am 6 Aug. 2013
Bearbeitet: 123123 am 6 Aug. 2013
I wrote in my mat file :function omg; load ('gong.mat') ; sound(y);
and i heared the gong when i PLAY but when ever i try to coder it not working
Walter Roberson
Walter Roberson am 6 Aug. 2013
Try adding a pause(10) after the sound() so that the sound has time to play before the program exits.
123123
123123 am 6 Aug. 2013
Still i cant make it work i give up :( some can make it for me pls??!!

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu MATLAB Coder finden Sie in Hilfe-Center und File Exchange

Produkte

Gefragt:

am 6 Aug. 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by