使用MATLAB 的內建函數求函數的零點(或方程式的根). >> % Define a polynomial: x^2 - 3x + 1. >> p = [1 -3 1];. >> % Generate a sequence [0, 0.05, 0.1, ..., 3].
web.nchu.edu.tw