Octave strings comparison
kodingwindow@kw:~$ octave
...
octave> kw = "Kodingwindow"
kw = Kodingwindow

octave> strcmp(kw, "Kodingwindow")
ans = 1

octave> strcmp(kw, "KODINGWINDOW")
ans = 0

octave> strncmp(kw, "Koding", 6)
ans = 1

octave> strcmpi("KW#12","kw#12")
ans = 1

octave> strcmpi("KW#12","kw#21")
ans = 0

octave> strncmpi("KW#12","kw",2)
ans = 1

octave> strrep(kw, "in", "#")
ans = Kod#gw#dow

octave> ischar(kw)
ans = 1

octave> a="Hello"
a = Hello

octave> b="hello"
b = hello

octave> a==b
ans =

  0  1  1  1  1

octave> b="Hello"
b = Hello

octave> a==b
ans =

  1  1  1  1  1

Advertisement