comp.soft-sys.matlab
[Top] [All Lists]

Re: Help for least square

Subject: Re: Help for least square
From: "Randy Poe"
Date: 22 Sep 2005 06:49:18 -0700
Newsgroups: comp.soft-sys.matlab
myphysics2010@xxxxxxxxx wrote:
> Dear John D'Errico, and matlaber....
>
> Sorry, for mistake in typing. Last time this problem I was posted in this 
> forum, but nobody for respond. So, far I can't solve and you are right, my 
> live is not happy.

Because as far as I can tell, you haven't managed to express
what you are solving problem.
>
> The matrix is contain humidity (10x4) measurement with 4-channel at one place 
> or position. Following is complete matrix and time (in minute in first 
> column) of measurement:
>
> A=[
>  0 22.2078 51.0973 50.1538 0
> 10 22.0556 51.0368 50.2587 0
> 20 21.9028 50.9743 50.3617 0
> 30 21.7493 50.9098 50.4628 0
> 40 21.5952 50.8434 50.5620 0
> 50 21.4405 50.7749 50.6592 0
> 60 21.2851 50.7045 50.7545 0
> 70 21.1292 50.6322 50.8478 0
> 80 20.9726 50.5580 50.9392 0
> 90 20.8154 50.4818 51.0285 0];

OK, so the first column is the independent variable (time) and
columns 2-5 are dependent variables (humidity in 4 places).

>
> My problem is how to using 'LEAST SQUARE METHOD' for fitting or extract or 
> combine, or select automatically through to resulting matrix (10x1).

This is the part that's unclear. Select what? Extract what?
Combine what? Fit what? You've told us you want a result
which is 10 x 1, but you haven't told us what sort of thing
that result should be.

I'm going to take a guess: do you want to fit four straight
lines vs. time, one for each column of 2, 3, 4, 5?

> Logically, the same place (position), our must be know that just one-value 
> (the best value) occurring, with old method use median or mean.

OK, my guess is wrong. Your model is not that the humidity
varies linearly in time, but that it is constant. You want
to fit a constant.

> I don't like use this method, caused the last column the value is zero, dan 
> first column its value lower around twice from second column.

If all your measurements were 0, why do you think the actual
value is 0? Forget the mathematical approaches, what other
information are you using that tells you this is nonzero?

And in column 2, all the measurements are around 21-22, but
you think the real value is around 50? Why do you think that?

> Perhaps you get my problem?

I think so. You want a method which will ignore your data and
give you the answers you think should be there instead.

No method will do that. You seem to have information which
is different from the data. What information is that? Why
do you think you can ignore the data?

                 - Randy


<Prev in Thread] Current Thread [Next in Thread>
Privacy Policy