0
votes

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 has 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.

1
Hi, you can motivate people to answer by removing your spelling errors (title!) and generally choosing a better title. Also have a look at the FAQ. - Jonas Heidelberg

1 Answers

1
votes

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

Ineligible Programs with MATLAB Compiler