c++ | assignment代写 | lab | matlab代写 – Estimation & Statistical Testing lab # 0

Estimation & Statistical Testing lab # 0

c++ | assignment代写 | lab | matlab代写 – 这是一个关于c++的题目, 主要考察了关于c++的内容,是一个比较经典的题目, 包括了c++等方面, 这个项目是lab代写的代写题目

Lab # 0 : Numerical computations in C/C++, and data visualization in Matlab

You are given the following mathematical model:

= ^2 + +

where is treated as an observable, is considered a constant (i.e., an errorless coefficient), and , and are the desired unknown parameters. A sample data set (i.e., pairs of and values) is given in Table 1 below:

``````Table 1: k and y values
k y k y k y
``````

– 0 .6283 4.0459 0.4712 5.277 9 1.5708 – 2.4 057

``````Perform the following tasks in C/C++:
Read in  and  from a text file
Populate design matrix , where each row  of  is [^2  1 ]
Populate misclosure vector , where each row  of  is []
Compute the normal equation matrix =
Compute the normal equation vector =
Estimate the desired unknown parameters , , and  in the vector =^0 +, where ^0 = 0 ,
and =^1
Estimate the vector of residuals =+
Compute the a-posteriori variance factor (scalar value)  02 =()/(), where  is the
number of observations, and  is the number of unknown parameters
``````

Winter 201 9 ENGO 36 3 : Estimation & Statistical Testing Lab # 0

2

`````` Output the estimated vector of unknown parameters and the estimated vector of residuals to
text files
``````
``````Perform the following tasks in Matlab:
Plot  vs.  for [ 1. 6 to 1. 6 ] based on the estimated unknown parameters (this should be
a smooth curve)
On the same figure, plot the observed  vs. the given  in Table 1 as individual data points
On a separate figure, plot a time series of the residuals (this could either be a line plot or
individual scattered points)
``````

Write-up / Deliverables

The write-up should include the results for the required steps (presented in a tabular and/or graphical format) and the answers to any questions.

Program Source Code

`````` This is an individual lab  assignment and as such all results presented in the write-up must be