Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!news2.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe01.iad.POSTED!7564ea0f!not-for-mail
From: Walter Roberson <roberson@hushmail.com>
Organization: Canada Eat The Cookie Foundation
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
Newsgroups: comp.soft-sys.matlab
Subject: Re: Check if two shifted matrices are equal
References: <gevia6$2hk$1@fred.mathworks.com>
In-Reply-To: <gevia6$2hk$1@fred.mathworks.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 27
Message-ID: <vVIQk.3167$dy1.2828@newsfe01.iad>
NNTP-Posting-Host: 24.79.146.116
X-Complaints-To: internet.abuse@sjrb.ca
X-Trace: newsfe01.iad 1226005211 24.79.146.116 (Thu, 06 Nov 2008 21:00:11 UTC)
NNTP-Posting-Date: Thu, 06 Nov 2008 21:00:11 UTC
Date: Thu, 06 Nov 2008 15:00:44 -0600
Xref: news.mathworks.com comp.soft-sys.matlab:499376


Colin wrote:

> I have two matrices that are 1 x 130943 and contain hex values.
 
> I want to be able to verify that they are in fact identical matrices but only one is shifted
> with respect to the other.

Do you only need to know that they -are- identical (but perhaps shifted), or do you need to
know the amount of the shift?

And do you happen to have any constraint on how much shift there would be? For example,
would it just happen to be the case that the shift would be by an even number of positions?

Is there exactly 1 hex digit per array location?

Would a fast "Not the same" or "Might be the same" be useful to you? e.g., are the
arrays often different and being the same is the much less common case that you can
afford to take longer to prove? For example, when two arrays are different, then
their histograms would often be different, so if the histograms are different then
you know [relatively quickly] that the arrays are not shifts of each other, and if
the histograms are the same then you could run a more detailed test.

-- 
.signature note: I am now avoiding replying to unclear or ambiguous postings.
Please review questions before posting them. Be specific. Use examples of what you mean,
of what you don't mean. Specify boundary conditions, and data classes and value
relationships -- what if we scrambled your data or used -Inf, NaN, or complex(rand,rand)?