% 用matlab寻找本原多项式。 n=4; x=gfprimfd(n,'all') % 求出n=4的所有本原多项式的系数序列,对变量x是升序。 for i=1:size(x); %将系数序列写成解析式,循环语句是依次写出所有的本原多项式 gfpretty(x(i,; end
我在command中依次输入: >> n=5
n =
5
>> x=gfprimfd(n,'all');for i=1:size(x);gfpretty(x(i,:));end ??? x=gfprimfd(n,'all');for i=1:size(x);gfpretty(x(i,:));end | Error: The input character is not valid in MATLAB statements or expressions. 担心是输入的太多了,就改用以下方式输入: >> x=gfprimfd(n,'all')
>> for i=1:size(x) gfpretty(x(i,:)) ??? gfpretty(x(i,:)) | Error: The input character is not valid in MATLAB statements or expressions.
看来是gfpretty(x(i,:))有问题,接着来: >> help gfpretty GFPRETTY Display a polynomial in traditional format. GFPRETTY(A) displays the GF polynomial A in a traditional format, omitting terms whose coefficients are zero. A is a row vector that specifies the polynomial coefficients in order of ascending powers.
GFPRETTY(A, STR) displays GF polynomial with the polynomial variable specified in the string variable STR.
GFPRETTY(A, STR, N) uses screen width N instead of the default 79.
For correct spacing in the display, use a fixed-width font.
文章评论(0条评论)
登录后参与讨论