octave-maintainers
[Top][All Lists]
Advanced

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

Re: `argn' ? … still part of Octave ?


From: John W. Eaton
Subject: Re: `argn' ? … still part of Octave ?
Date: Thu, 6 Oct 2011 08:50:10 -0400

On  6-Oct-2011, Ben Abbott wrote:

| 
| On Oct 5, 2011, at 9:31 PM, Carnë Draug wrote:
| 
| > On 6 October 2011 01:42, Ben Abbott <address@hidden> wrote:
| >> On Oct 5, 2011, at 8:11 PM, Carnë Draug wrote:
| >>
| >> Ok, you're right, inputname() is obviously working correctly. But the 
"args" in the second example is incorrect?
| > 
| > I checked again and it's not incorrect. The problem was in the loop to
| > get argn in the cell array. The following works fine:
| > 
| > function fubar (varargin)
| >    disp(argn)
| > endfunction
| > 
| > a = 1; b = 2; c = 3; d = 4;
| > 
| > fubar (a, b, a*b, c, d)
| 
| Ok, so it appears when "a*b" is present a "\n" is missing?

Here is what I see:

  octave:1> function fubar (varargin)
  > disp (argn)
  > class (argn)
  > size (argn)
  > toascii (argn)
  > endfunction
  octave:2> a = 1; b = 2; c = 3; d = 4;
  octave:3> fubar (a, b, a*b, c, d)
  a
  b
  a * b
  c
  d
  ans = char
  ans =

     5   5

  ans =

      97     0     0     0     0
      98     0     0     0     0
      97    32    42    32    98
      99     0     0     0     0
     100     0     0     0     0


That seems to be working the way I would expect.

jwe


reply via email to

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