开发者

building execute m-file + simulink model (I have a program with one error!)

开发者 https://www.devze.com 2023-04-10 18:41 出处:网络
I have been written a program with MATLAB: clear all; clc loaddata.dat a=data+2; b=fun(a); sim(‘new_equ2’)

I have been written a program with MATLAB:

  1. clear all; clc
  2. load data.dat
  3. a=data+2;
  4. b=fun(a);
  5. sim(‘new_equ2’)
  6. c=b+A;
  7. save new_data c -ascii

--> my program 开发者_如何学JAVAhas been saved by name “test.m”

In line 4: ‘fun’ is a function.

In line 5: ‘new_equ2’ is a simulink model.

In line 6: ‘A’ is simulink model output.

I wanted to build execute file from test.m, therefore i wrote in command window:

mcc -m test

After that, i ran test.exe in windows command prompt. I encountered with this error:

“Undefined function or method ‘sim’ . . . “

I want to create execute file from test.m that it runs without error.


Simulink, including the sim command, is not supported by MATLAB Compiler.

Ineligible Programs with MATLAB Compiler

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号