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)
obj.memory = -ones(11, 11);
end
function [Out] = stepImpl(obj,message)
i = find(obj.memory(:,1) == message(1));
if(all(i ~= 0))
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?