How can I solve this question?

1 回表示 (過去 30 日間)
Alice Zurock
Alice Zurock 2020 年 5 月 31 日
コメント済み: Alice Zurock 2020 年 5 月 31 日
------------------------------------------------------------------------------------------------------------------------------------
Example 12.1 Nonlinear Model:
------------------------------------------------------------------------------------------------------------------------------------
Eq. 12.19& Eq. 12.20:
------------------------------------------------------------------------------------------------------------------------------------
Eq. 12.22& Eq. 12.23:
  2 件のコメント
KSSV
KSSV 2020 年 5 月 31 日
What have you attempted?
Alice Zurock
Alice Zurock 2020 年 5 月 31 日
clc; clear; close all; format compact; format long eng;
rng('default');
% true signal curve
x = (0:.1e-4:2).';
y = .2 * ones(length(x),1) - x + .9 * x.^2 + .7 * x.^3 - .2 * x.^5;
% plot the true curve
%figure; plot(x1,y1,'b');
% training samples (20 or 500)
N = 20;
% sample interval [a b]
a = 0; b = 2;
% generate samples
x1 = (a : b/N : b - b/N).';
% noise generation
sigma_n = .05;
n = sqrt(sigma_n) .* randn(N,1);
% use the true theta
theta_true = [.2; -1; .9; .7; -.2];
% or a random one
theta_dstrbd = [-0.004; -10.54; 0.465; 0.087; -.093];
l = length(theta_true);
% compute the measurement matrix
Phi = [ones(N,1) x1 x1.^2 x1.^3 x1.^5];

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeClassification についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by