| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1997 人关注过本帖
标题:代码出错调试
只看楼主 加入收藏
一个孩子
Rank: 8Rank: 8
等 级:蝙蝠侠
威 望:5
帖 子:356
专家分:954
注 册:2012-10-1
结帖率:96.77%
收藏
 问题点数:0 回复次数:0 
代码出错调试
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  求高手指点一下 我这个该怎样改一下才行,感激不尽
搜索更多相关主题的帖子: continue command 多项式 
2014-12-04 17:19
快速回复:代码出错调试
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016189 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved