Unknown exception 0x80000026 Error/Crash with Simulink
Mostra commenti meno recenti
Hello, I have created a system object inside a simulink model. Right now it does something like this (nothing so far:P, because I'm stuck on technicalities):
function setupImpl(obj,u)
% Implement tasks that need to be performed only once,
% such as pre-computed constants.
obj.memory = -ones(11, 11);
end
function [Out] = stepImpl(obj,message)
% Implement algorithm. Calculate y as a function of
% input u and discrete states.
i = find(obj.memory(:,1) == message(1));
if(all(i ~= 0)) %find id already in memory
Out = i(1);
else
Out = i(1);
end
end
When it executes it crashes with this error message: Unknown exception 0x80000026 I realized that I have to use the scalar value of i, but when I call it i(1) it won't work. Also i is always supposed to either be empty or return 1 index (there cannot be more than 1 occurrence).
Any ideas?
1 Commento
highWaters
il 28 Gen 2016
Modificato: Walter Roberson
il 28 Gen 2016
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Startup and Shutdown in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!