Path: news.mathworks.com!not-for-mail
From: " mshahrashoub shahrashoub" <shahrashoub@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: DIscrete data
Date: Wed, 1 Sep 2010 07:58:09 +0000 (UTC)
Organization: University
Lines: 33
Message-ID: <i5l12h$g8$1@fred.mathworks.com>
References: <i5itrq$e8b$1@fred.mathworks.com> <i5jobo$a3h$1@fred.mathworks.com>
Reply-To: " mshahrashoub shahrashoub" <shahrashoub@yahoo.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1283327889 520 172.30.248.38 (1 Sep 2010 07:58:09 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 1 Sep 2010 07:58:09 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2458707
Xref: news.mathworks.com comp.soft-sys.matlab:666729

"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <i5jobo$a3h$1@fred.mathworks.com>...
> " mshahrashoub shahrashoub" <shahrashoub@yahoo.com> wrote in message <i5itrq$e8b$1@fred.mathworks.com>...
> > Hi,
> > 
> > I want to ask, are there any way/function to scale data.
> > 
> > I have a matrix
> > 
> > Ex : DataM % Matrix
> > 
> > to discrete it, I am using 
> > 
> > minValue = min(DataM (:)); %MInimim value
> > maxValue = max(DataM (:)); % Maximum Value
> > 
> > DataM = DataM -minValue ;
> > 
> > DataM = Scale * (DataM ./ maxValue); % Rescale matrix ,amount of scale
> > 
> > My question is when I use this code, are there any data loss on data ?
> > (Values that I am working on so small and noisy)
> > 
> > Thanks in Advance
> - - - - - - - - -
>   Provided you know the previous maximum and minimum values of DataM, there should essentially be no loss of information in your scaling process.  Dividing by Scale, multiplying by that maximum, and then adding that minimum brings you back to the original data except for round-off errors, which are usually of the order a few parts in 1e16.
> 
>   Of course if the maximum and minimum are very close together and a long way from zero, the round-off error can be much larger.  For example if the maximum = 1e5 and minimum = maximum-1, then you will lose roughly five decimal places of accuracy (out of sixteen) in such a restoration.
> 
>   Is this the sort of thing you meant by "data loss"?
> 
> Roger Stafford

I mean the round-off error. But I got my answer. Thank you.