octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #31536] demos for patch and isosurface fail


From: Rik
Subject: [Octave-bug-tracker] [bug #31536] demos for patch and isosurface fail
Date: Wed, 03 Nov 2010 21:07:00 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Ubuntu/9.10 (karmic) Firefox/3.6.12

Follow-up Comment #3, bug #31536 (project octave):

Oh no, I hope I'm not abusing the poor defenseless comma-separated lists. 
:)

Actually, I might not understand the example well enough and I did look only
briefly, but I think I avoid cs-lists altogether.


For hypothetical function call patch (...,"cdata", c1, "cdata", c2).  Diary
from Octave session
args = {"cdata", [1,2,3], "cdata", [4,5,6]};
octave:2> args = { "cdata", [1,2,3], "cdata", [4,5,6] };
octave:3> class(args)
ans = cell
octave:4> eval1 = strcmpi (args, "cdata")
eval1 =

   1   0   1   0

octave:5> class eval1
ans = char
octave:6> eval2 = find(eval1, 1, "last")
eval2 =  3
octave:7> eval3 = eval2 + 1
eval3 =  4
octave:8> output_cdata = args {eval3}
output_cdata =

   4   5   6

octave:9> isvector (output_cdata )
ans =  1


What looks potentially weak to me is that if there are no matches then find
returns the empty matrix and there is the reliance on '[] + 1 == []'

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?31536>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]