⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pr9_22.m

📁 Spread Spectrum and CDMA Principles and Applications 书籍和代码
💻 M
字号:
%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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -