資源簡介
MATLAB語言,應用里米茲算法做最佳一致逼近

代碼片段和文件信息
%?Author?:?Huapeng?Zhou
%?Address?:?2#221A?Zijing?Department?Tsinghua?University?Beijing?China
%?Email?Address?:?shodoco@gmail.com
%?MY_ERROR?is?the?function?of?the?error?between?the?function?you?want?to
%?approximate?and?the?estimated?polynomial.
%?The?first?argument?x?is?a?row?vector?of?the?point(s)?ont?which?you?want
%?to?evaluate?the?error.If?it?has?only?one?elementthen?it?gives?the?error
%?on?this?point.
%?The?second?argument?fun?which?defines?the?function?that?you?want?to
%?approximate?is?a?function?handlean?inline?object?in?MATLAB6?or?an
%?anonymous?function?in?MATLAB7.
%?The?third?argument?A?gives?the?estimated?polynomial?coefficents?in?a
%?row?array.
function?e?=?my_error(x??fun??A)
%?The?polynomial?coefficients?array??make?it?a?column?array
A?=?A(:);
%?The?argument?array?make?it?a?column?array
x?=?x(:);
%?Order?of?the?polynomial?equals?to?the?number?of?coefficients?minus?one
order?=?length(A)-1;?
%?The?powers?out?in?a?row?and?repeated?for?each?argument?to?form?a?matrix
powers?=?ones(length(x)1)*[0:order];
%?To?evaluate?the?polynomial?at?the?argument?array
poly_temp?=?(x?*?ones(1??order?+?1)).^powers;
poly_temp?=?poly_temp?*?A;
%?To?get?the?result?of?the?difference?between?the?function?evaluated?at?the
%?argument?array?and?the?polynomial?evaluated?at?the?argument?array
e?=?feval(fun??x)?-?poly_temp;
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????5138??2008-11-29?13:56??my_remez_new.m
?????文件???????1242??2008-11-29?14:15??my_test.m
?????文件???????1391??2008-11-29?13:55??my_error.m
?????文件???????1793??2008-11-29?13:56??my_fzero.m
?????文件???????4357??2008-11-29?13:56??my_remez.m
-----------?---------??----------?-----??----
????????????????13921????????????????????5
- 上一篇:MATPOWER中文手冊
- 下一篇:采用Simuli
nk實現超外差接收系統的動態仿真
評論
共有 條評論