A toolbox for simple finite field operation

버전 1.3.0.0 (10.9 KB) 작성자: Samuel Cheng
This is a toolbox providing simple operations (+,-,*,/,.*,./,inv) for finite field.
다운로드 수: 796
업데이트 날짜: 2012/9/4

라이선스 보기

This toolbox can handle simple operations (+,-,*,/,.*,./,inv) of GF(p^n) for any p and n. Examples are given below (also documented in gf_test.m).

If you find any bug or have any concern/comment, please contact me.

% setup path
java_path_setup;
% create gf class of 3^2
gf9=gf(3,2);

%%%%
% Eg. 1
a=[2 1;1 0]

% compute rank
gf9.rank(a)

% compute inverse
inva = gf9.inv(a)

% Check inverse
a_times_ainva=gf9.mult(a,inva)

% matrix divide
gf9.div(a,a)

%%%%%
% Eg. 2
b=[1 2 1;1 0 1];
c=[1 1 0;2 1 1];

% compute summation
gf9.add(b,c)

% compute subtraction
gf9.sub(b,c)

% compute dot multiplication
gf9.dmult(b,c)

% compute dot division
gf9.ddiv(b,c)

% output the primitive polynomial
gf9.return_primitive_polynomial % x^2 + 1

% show polynomial representation
gf9.return_poly_representation(5) % x + 2

%%%%
% Eg. 3

% manipulating polynomials.

a=[1 2 1 1];
b=[1 3 1];

gf9.conv(a,b)

[q,rem]=gf9.deconv(a,b)

인용 양식

Samuel Cheng (2024). A toolbox for simple finite field operation (https://www.mathworks.com/matlabcentral/fileexchange/32872-a-toolbox-for-simple-finite-field-operation), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2010b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Error Detection and Correction에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.3.0.0

Added new functionality to manipulate polynomials.

1.1.0.0

Oops, found two silly bugs. First, an error check condition was corrected.

Second, I guess it is probably the safest to run a separate script to setup path and so I extracted that part out.

1.0.0.0