• 大小: 3KB
    文件类型: .m
    金币: 1
    下载: 0 次
    发布日期: 2021-01-04
  • 语言: Matlab
  • 标签: gauss  elimination  

资源简介

利用二元域的高斯消元法得到输入矩阵H对应的生成矩阵G,同时返回与G满足mod(G*P ,2)=0的矩阵P,其中P 表示P的转置使用方法:[P,G]=Gaussian(H,x),x=1 or 2,1表示G的左边为单位阵-binary domain PGE law input matrix corresponding to the formation of H matrix G, Meanwhile the return of mod meet with the G (G * P, 2) = 0 matrix P, which said P P switch home use : [P, G] =

资源截图

代码片段和文件信息

function [outputHoutputG]=GassianXY(inputxinputy); 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
%%%---- 该程序的目的:输入校验矩阵x,在二元域上对x进行高斯消去生成H,然后产生与H对应的生成矩阵G,输出H,G ----%%% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
%%%%%----参考依据:x (高斯消去) -> H=[I|P] -> G=[P‘|I]G ------%%%%% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
%%%%%-----------第一步: 初始化相关数据 ---------------%%%%%% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
H = inputx; 
flag = inputy;%标志位,确定最后生成的G是右边为单位阵(flag = 1)还是左边为单位阵(flag

评论

共有 条评论