Reputation: 229
54 assert(obj.M_1 < 256);
58 assert(obj.i <= 256);
59 assert(obj.i > 0);
62 y = obj.old_x(obj.i:obj.i+obj.M_1,1)'*obj.w;
The codegen report highlighted "obj.i:obj.i+obj.M_1,1" for me but I cannot figure out the problem. Please enlighten me if you have any idea.
Upvotes: 0
Views: 105
Reputation: 229
Adding an extra variable to store the boundary value and assert that variable to some condition solves the problem.
ie.
idx = obj.i+obj.M_1
assert(idx < 512);
Upvotes: 1