[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #34303] strfind does not work with ascii the s
From: |
Philip Nienhuis |
Subject: |
[Octave-bug-tracker] [bug #34303] strfind does not work with ascii the same way as matlab do |
Date: |
Sat, 17 Sep 2011 10:47:51 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6 |
Follow-up Comment #1, bug #34303 (project octave):
As you can see yourself on ML's on-line docs, ML's strfind() formally expects
character or cellstring arguments. IOW, what you suggest is that Octave should
mimic undocumented ML features.
Using such undocumented features is always risky, as ML might change those w/o
notice.
In your example, you can easily do
posA = strfind (char (st), 'A')
to get the same results:
octave-3.2.4.exe:8> st = [45 23 45 23 46 39 19 10 65 97]
st =
45 23 45 23 46 39 19 10 65 97
octave-3.2.4.exe:9> char (st)
ans = -↨-↨.'‼
Aa
octave-3.2.4.exe:10> posA = strfind (char(st), 'A')
posA = 9
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?34303>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/