題目f(x)=-2x^4+3x^3+2x^2-x+5=0
程式碼clear all
z=-2:0.01:1
A=unidrnd(5)-3
x=A
p=[1,3,2,-1,5]
y=polyval(p,z)
q=polyder(p)
r = roots(p)
for i=1:10000
y1=polyval(q,x)
x1=x-y1/1000 %%1000這個數當作步伐
x=x1
end
...
shell script 設計進度列進度列:#!/bin/bash
# Author : Teddy Skarin
# 1. Create ProgressBar function
# 1.1 Input is currentState($1) and totalState($2)
function ProgressBar {
# Process data
let _progres...