octave-maintainers
[Top][All Lists]
Advanced

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

Re: Indexing with "string" values in Matlab


From: Michael D. Godfrey
Subject: Re: Indexing with "string" values in Matlab
Date: Fri, 25 Oct 2013 12:49:31 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0

On 10/25/2013 12:33 PM, John W. Eaton wrote:
clear y
  y('adbc') = '1234';
  abs (y)

show? Does it fill with blanks (ASCII 32)? Octave fills with 0 and then doesn't display the NUL character.

jwe
Yes, blanks got eaten up:
>> abs(y)

ans =

  Columns 1 through 22

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

  Columns 23 through 44

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

  Columns 45 through 66

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

  Columns 67 through 88

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

  Columns 89 through 100

     0     0     0     0     0     0     0     0    49    51 52    50

>


reply via email to

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