📄 polyadd.m
字号:
function p = polyadd(a,b)% add the polynomials p=a+b% The polynomials are represented with the HIGHEST coefficient first% e.g., x^2 + 3x + 4 -- [1 3 4], x^2 + 3x --- [ 1 3 0]% Copyright 2004 by Todd K. Moon% Permission is granted to use this program/data% for educational/research onlyk = length(b) - length(a);p = [zeros(1,k) a] + [zeros(1,-k) b];if(all(p==0)) p = 0;else p = p(find((p==0)==0):end); % get rid of leading zerosend
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -