代码出错调试
m=2;rows=3;
columns=3;
s=primpoly(m);%产生不可约多项式(本源多项式)
while 1
u=randi([0,2^m-1],rows,columns);
t=randi([0,2^m-1],rows,columns);
U=gf(u,m,s);
rank_u=rank(u);
rank_t=rank(t);
if (rank_u==rows)&&(rank_t==rows)
break;
else
continue;
end
end
syms x1 x2 x3 y real
X=[x1 x2 x3]';
Y=[1,y,y^2];
Y_16=[1,y^2,y^2+y];
v=randi([0,2^m-1],rows,1);
U_X=U*X+v %本行出错
出错提示:Error using mupadmex
Error in MuPAD command: DOUBLE cannot convert the input expression into a double array.
If the input expression contains a symbolic variable, use the VPA function instead.
Error in sym/double (line 702)
Xstr = mupadmex('symobj::double', S.s, 0);
Error in gf (line 40)
if ~all(all(isfinite(double(x))))
Error in gf/mtimes (line 12)
if ~isa(y,'gf'), y = gf(y,x.m,x.prim_poly); end
Error in matrix_combine (line 4)
s=A*B;
Error in test (line 22)
U_X=matrix_combine(U,X)+v
小弟刚接触Matlab 求高手指点一下 我这个该怎样改一下才行,感激不尽