工程與科技
大學

clc
opengl('software')
load HW9_Data
x = data(:, 1);
y = data(:, 2);
y=y+0.01*randn(size(y)); % Artificial noise
tic%開始計時
% ---
%將你的擬合方法寫在兩條虛線間
y2=你的擬合結果
%- - -
fprintf(計算時間=%gln,toc);
plot(x, y, 'ro', x, y2, 'b-');
legend('Sample data', 'Regression curve');
fprintf(誤差平方和=d(n',sum((y-y2)^2);顯誤值
xlabel 'x'
ylabel 'y'

PromotionBanner

解答

尚無回答

您的問題解決了嗎?