matlab pretty什么用,Polynomial in traditional format

gfpretty

Polynomial in traditional format

Syntax

gfpretty(a)

gfpretty(a,st)

gfpretty(a,st,n)

Description

gfpretty(a) displays

a polynomial in a traditional format, using X as

the variable and the entries of the row vector a as

the coefficients in order of ascending powers. The polynomial is displayed

in order of ascending powers. Terms having a zero coefficient are

not displayed.

gfpretty(a,st) is the

same as the first syntax listed, except that the content of st is

used as the variable instead of X.

gfpretty(a,st,n) is

the same as the first syntax listed, except that the content of st is

used as the variable instead of X, and each line

of the display has width n instead of the default

value of 79.

Note

For all syntaxes: If you do not use a fixed-width font, the

spacing in the display might not look correct.

Examples

Display statements about the elements of GF(81).

p = 3; m = 4;

ii = randi([1,p^m-2],1,1); % Random exponent for prim element

primpolys = gfprimfd(m,'all',p);

[rows, cols] = size(primpolys);

jj = randi([1,rows],1,1); % Random primitive polynomial

disp('If A is a root of the primitive polynomial')

gfpretty(primpolys(jj,:)) % Polynomial in X

disp('then the element')

gfpretty([zeros(1,ii),1],'A') % The polynomial A^ii

disp('can also be expressed as')

gfpretty(gftuple(ii,m,p),'A') % Polynomial in A

Below is a sample of the output.

If A is a root of the primitive polynomial

3 4

2 + 2 X + X

then the element

22

A

can also be expressed as

2 3

2 + A + A

Introduced before R2006a

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值