error: Invalid Simulink object handle

hello everyone
I try to simulate a model in Simulink, using file for global data and an introductory file, where the opening of the model is launched by open_system (TSmodel).
in the model, I use matlab function Interpreted.
when I simulates the init file:
Error using ==> open_system (TSmodel)
Invalid object handle Simulink.
cann u help me to resolve it?

回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2015 年 6 月 21 日

0 投票

Check if Tsmodel is in the current folder, type

4 件のコメント

studentU
studentU 2015 年 6 月 21 日
yes, all the file are in the current folder
Azzi Abdelmalek
Azzi Abdelmalek 2015 年 6 月 21 日
What is the init file?
studentU
studentU 2015 年 6 月 21 日
編集済み: studentU 2015 年 6 月 21 日
it contains just the initiation of variables.
Fglobal;
A11=0;
A22=0;
C11=0;
C22=0;
C33=0;
F=0;
G=0;
I1=0;
I2=0;
I3=0;
h1=0;
h2=0;
h3=0;
h4=0;
a=0;
xx1=0;
xx2=0;
xx3=0;
Az=[];
El=[];
In=[];
Or=[];
%open model
open_system(TSmodel);
Azzi Abdelmalek
Azzi Abdelmalek 2015 年 6 月 21 日
編集済み: Azzi Abdelmalek 2015 年 6 月 21 日
If TSmodel is the name of your simulink model, you have to put it between quotes
open_system('TSmodel')

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

カテゴリ

ヘルプ センター および File ExchangeModeling についてさらに検索

タグ

質問済み:

2015 年 6 月 21 日

編集済み:

2015 年 6 月 21 日

Community Treasure Hunt

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

Start Hunting!

Translated by