[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #42400] examples in documentation for strsplit
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #42400] examples in documentation for strsplit do not work. Alternate implementation does |
Date: |
Wed, 21 May 2014 15:45:04 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.137 Safari/537.36 |
URL:
<http://savannah.gnu.org/bugs/?42400>
Summary: examples in documentation for strsplit do not work.
Alternate implementation does
Project: GNU Octave
Submitted by: None
Submitted on: Wed 21 May 2014 03:45:03 PM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Documentation
Status: None
Assigned to: None
Originator Name: Barry Solomon
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Release: 3.6.4
Operating System: Microsoft Windows
_______________________________________________________
Details:
I was trying to split a string into individual strings. I followed the
documentation and it did not work. So I tried copying and pasting the example
and that did not work either. Then I made a change and it worked. see the
examples below.
Example from documentation:
https://www.gnu.org/software/octave/doc/interpreter/Manipulating-Strings.html
octave:54> strsplit ("a,,b, c", {",", " "}, false)
error: strsplit: S and SEP must be string values
error: called from:
error: C:OctaveOctave3.6.4_gcc4.6.2shareoctave3.6.4mstringsstrsplit.m at
line 59, column 5
I changed the braces to brackets and it worked:
octave:54> strsplit ("a,,b, c", [",", " "], false)
ans =
{
[1,1] = a
[1,2] =
[1,3] = b
[1,4] =
[1,5] = c
}
Not sure if this is an Octave problem or somehow just a problem with my
system. I am using a windows seven machine and gcc4.6.2
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Wed 21 May 2014 03:45:03 PM UTC Name: octave image.png Size: 48kB
By: None
<http://savannah.gnu.org/bugs/download.php?file_id=31412>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?42400>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #42400] examples in documentation for strsplit do not work. Alternate implementation does,
anonymous <=