# Matlab Data Analysis: Observation Model Problem

1. Oct 17, 2016

### lep11

The observation model will be $z=H\theta+v$, where $z$ is column vector containing the results, $H$ is the observation matrix, $\theta$ is the parameter vector and $v$ is a vector containing random additive noise.

b.)
In this case $z$=[1 1 0; 1 0 1; 0 1 1; 1 1 1]*[$m_1$ $m_2$ $m_3$$]^{T}$+$v$.

Here's the code I came up with:
Code (Text):
H=[1 1 0;1 0 1; 0 1 1; 1 1 1];% Observation matrix
z=[4.45, 7.35 ,6.8, 10]'; % simulated weights of rock pairs, (I just made them up)
th=inv(H'*H)*H'*z; %solving for m1,m2,m3
It is easy to solve for the masses of the rocks using matrix operations. However, I am not sure how to model the two cases properly. How would one simulate the cases? What if the total weight of the rocks is unknown? Can you please help me with this problem?

P.S. I apologise in advance if this is wrong section for this topic.

Last edited: Oct 17, 2016
2. Oct 19, 2016

### lep11

Anyone?

3. Oct 24, 2016

### Dr. Courtney

Without noise, you get three equations and three unknowns:

m1 + m2 = a
m2 + m3 = b
m3 + m1 = c

This can be solved by any standard method: substitution, elimination, matrix, etc.

Once you add noise, there is not an exact solution. It mostly becomes something like a least squares problem:

minimizing the square error between m1 + m2 and a, m2 + m3 and b, m3 + m1 and c.