problem when i starting simulink

31 ビュー (過去 30 日間)
123123
123123 2013 年 8 月 4 日
i made some mini model and put there blocks off :MATLAB FUNCTION,AUDIO RECIVE
and in the matlab function i wrote:
function y = fcn(u)
%#codegen
y = u;
a=wavread('moho.wav');
wavplay=(a);
end
that mean that i trying to active this file that make sound
and when i start to code to c its write this problem:*_
The specified code generation target for model 'untitled' cannot be used with a variable-step solver. You must either configure the solver options for a fixed-step solver with an appropriate integration algorithm, or select a target that supports a variable-step solver, such as rsim.tlc. Click Open to launch the configuration dialog. Modify either the solver options on the Solver page or the system target file on the Code Generation page.

回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 8 月 4 日
That means, you should change the step time of your solver from variable step to fixed step (in configuration parameters)
  2 件のコメント
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 8 月 4 日
123123 commented
yes i did this and then when i was trying to start : code->c/c++ code-
>build model its write to me : Unable to locate a C-compiler required by Stateflow and MATLAB Function blocks. Use 'mex -setup' to select a supported C-compiler.
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 8 月 4 日
Then, in Matlab windows command type
mex -setup
and choose your compiler

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSimulink Coder についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by