resolve_polynomial.m

来自「这是我学习《MATLAB程序设计与应用》刘卫国、陈昭平  一书时第一章和第二章」· M 代码 · 共 13 行

M
13
字号
%roots 
%Polynomial roots Syntaxr = roots(c)
%Description

%r = roots(c) 
%returns a column vector whose elements are the roots of the polynomial c. 
%Row vector c contains the coefficients of a polynomial, ordered in 
%descending powers. If c has n+1 components, the polynomial it represents is .
 
c=input('多项式s^3-6s^2-72,输入格式为p = [1 -6 -72 -27];请输入一个多项式:');
r=roots(c)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?