Let us try to understand the least square fitting method using an example:

—Utpal Kumar (IES, Academia Sinica)

Institute of Earth Sciences Coders

Let's code!

Let us try to understand the least square fitting method using an example:

—Utpal Kumar (IES, Academia Sinica)

%d bloggers like this:

G=[ones(N,1),t]; what does it mean ones?.

I don’t understand this expression… 😛

LikeLike

@Rocio: “ones” is a function in MATLAB that creates a matrix of values 1. Here, ones(N,1) will create a N (rows) x 1(column) matrix of 1. G is the matrix of coefficient values of the model. For fitting a straight line, the model is v = 1.m1 + t.m2.

LikeLike