octave fittype問題處理

function [ parameter ] = checkcostfunc()
%CHECKC2 Summary of this function goes here
% check if the cost function works well
% check with the matlab fit function as standard

%check cost function 2
x=[1;2;3;4];
y=[1.1;2.2;2.7;3.8];

EXPR= {‘x’,’1’};
p=fittype(EXPR);
parameter=polyfit(x,y,p);

parameter=polyfit(x,y,1);
end

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章