Comparing Strings
I have two arrays of strings,
example:
x = {'a' 'b' 'c'}
y = {'b' 'c' 'a'}
If I try to compare the first string in x, x(1), to the
first in y, y(1), I get an error:
x(1) == y(1)
??? Undefined function or method 'eq' for input arguments
of type 'cell'.
How can I compare two strings so that MatLab returns 1 if
they are the same or 0 if they're different.
Thanks
Ben
.
Relevant Pages
- Re: Option Compare Statement
... both arrays are always the same type. ... compare text,. ... Your first post regarding this in the vb.controls newsgroup was, ... strings, let's say A and B. Then I want to compare their values. ... (microsoft.public.vb.general.discussion) - Re: A note on computing thugs and coding bums
... Here's my response including a bug fix. ... to make "modern strings" possible was designed and first implemented ... contents to strings, to compare them, and to duplicate them. ... while the Pike code will NEVER work...for international strings. ... (comp.programming) - Re: Ascan with a Substr
... the above suggestion: ... operator to compare the strings. ... code block you originally used was just right, ... (comp.lang.clipper) - Re: Ascan with a Substr
... The following solution work well ... operator to compare the strings. ... code block you originally used was just right, ... (comp.lang.clipper) - Re: almost equal strings
... Those are good for comparing words, or arbitrary strings, as Roedy asked, but he reveals that he actually wants to compare phrases. ... You might need a more refined scoring method, though - not all insertion, deletions or substitutions are of equal importance. ... Anyway, i don't think cljp is the place to ask about this - there is a huge body of knowlege about text processing which Roedy could tap into, and there must be a place to ask questions on it. ... (comp.lang.java.programmer) |
|