How do i fix the error titled ''Unexpected exception (Package is not open) was caught''?

3 ビュー (過去 30 日間)
Marc Saade
Marc Saade 2019 年 2 月 21 日
Hello I am doing a simulation and i am trying in a script to run the simulink model and get result of an output for different parameter.
clc
clear all
close all
%Define parameter sets
iteration=275;
K_sweep=linspace(0.39,0.63375,275);
simout=cell(1,iteration);
%run the simulation command in a loop and collect the simualtion results
for idx=1:length(K_sweep)
%load Simulink model
load_system('MyMODEL');
set_param('MyMODEL/ESR','Resistance',num2str(K_sweep(idx)));
simout{idx}=sim('MyMODEL');
v122=V12(1:20920,1);
%Store values into
sad(:,idx)=v122;
end
but i get this error (though the simulation work and takes a few data and store them into the sad but then crashes)
the error is ''Unexpected exception (Package is not open) was caught''.
Can someone please tell me how can i fix this?

回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by