pr9_22.m
来自「Spread Spectrum and CDMA Principles and 」· M 代码 · 共 16 行
M
16 行
%Problem 9.22;
%binary polynomial operations;
clear all;
a=input('input binary polynomial (senior coeffs last) a='); %input vector of the first polynomial coefficients in a degree-ascending order;
b=input('input binary polynomial b='); %input vector of the second polynomial coefficients in a degree-ascending order;
S=gfadd(a,b); %summation of a,b;
M=gfconv(a,b); %multiplication of a and b;
[Q,R]=gfdeconv(a,b); %division of a by b;
fprintf('\n');
fprintf(['a= ',num2str(a)]); fprintf('\n');
fprintf(['b= ',num2str(b)]); fprintf('\n');
fprintf(['a+b=',num2str(S)]); fprintf('\n');
fprintf(['axb=',num2str(M)]); fprintf('\n');
fprintf(['quo=',num2str(Q)]); fprintf('\n');
fprintf(['rem=',num2str(R)]); fprintf('\n');
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?