From owner-help-octave at bevo dot che dot wisc dot edu Thu Jan 11 13:14:46 1996 Subject: Re: strings From: scotte at Eng dot Auburn dot EDU (A. Scottedward Hodel) To: corbeil at allsparc dot ct dot tsc dot com (Allan Corbeil) Cc: help-octave at che dot utexas dot edu Date: Thu, 11 Jan 1996 13:15:02 -0600 This is correct; they are automatically converted to the ascii code numbers. (A couple of years ago, we couldn't even do that.) It's inconvenient, but what must be done currently when manipulating strings is to use the setstr function. For example, the following code prints a 2D string matrix: for ii=1:rows(lmat) disp( setstr(lmat(ii,:)) ) endfor >In octave, I can't seem to define 2-D string arrays. >I also cannot do simple subscripting. For example: >str=["abc";"def"] >s1=str(1:2) >Can anyone help. >Also do the equivalent of MEX files exist for octave? I think John (Eaton) told me this was doable, but I haven't done it yet. A S Hodel Dept Elect Eng. 200 Broun Hall Auburn University (334) 844-1854 scotte at eng dot auburn dot edu http://www.eng.auburn.edu/users/scotte Fax: -1809