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;
codegen报告为我强调了“obj.i:obj.i + obj.M_1,1”,但我无法弄清楚问题。如果您有任何想法,请赐教。
答案 0 :(得分:1)
添加一个额外的变量来存储边界值并将该变量断言到某种条件可以解决问题。
即
idx = obj.i+obj.M_1
assert(idx < 512);