[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #43346] the SWITCH example in Edition 3 for Oc
From: |
Mike Miller |
Subject: |
[Octave-bug-tracker] [bug #43346] the SWITCH example in Edition 3 for Octave version 3.6.4 page 164 |
Date: |
Thu, 02 Oct 2014 11:06:24 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36 |
Update of bug #43346 (project octave):
Status: None => Invalid
Open/Closed: Open => Closed
_______________________________________________________
Follow-up Comment #1:
Thanks for your bug report. This does not appear to be a bug to me. Note that
c = {6, 7, 8}
and
c = {6:8}
do not produce the same thing. The first is a cell array of the scalars 6, 7,
and 8. The second is a cell array containing one element, which is a row
vector of [6, 7, 8].
To convert a range into a cell array, you can use
num2cell (6:8)
This expression does work as a case in a switch block.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?43346>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/