<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div style="RIGHT: auto"><SPAN style="RIGHT: auto">Thank you. <VAR id=yui-ie-cursor></VAR> part function works.</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN> </div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">Yes, I was frustrated with not being able to get parts of a string by addressing <SPAN id=misspell-0>myString</SPAN>(4:6) and was looking around to find combinations of [] and ().  Thank you for clarifying.</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN> </div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">Jerry</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN> </div>
<DIV style="FONT-FAMILY: arial, helvetica, sans-serif; FONT-SIZE: 10pt">
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"><FONT size=2 face=Arial>
<DIV style="BORDER-BOTTOM: #ccc 1px solid; BORDER-LEFT: #ccc 1px solid; PADDING-BOTTOM: 0px; LINE-HEIGHT: 0; MARGIN: 5px 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; HEIGHT: 0px; FONT-SIZE: 0px; BORDER-TOP: #ccc 1px solid; BORDER-RIGHT: #ccc 1px solid; PADDING-TOP: 0px" class=hr contentEditable=false readonly="true"></DIV><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> <SPAN id=misspell-1>Mathieu</SPAN> <SPAN id=misspell-2>Dubois</SPAN> <mathieu.dubois@limsi.fr><BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> users@lists.scilab.org<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Monday, September 26, 2011 11:24 AM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: [scilab-Users] How to address part of a string<BR></FONT><BR>
<DIV style="RIGHT: auto" id=yiv1919112185>On 09/26/2011 08:12 PM, Jerry Wang wrote: 
<BLOCKQUOTE style="RIGHT: auto" type="cite">
<DIV style="BACKGROUND-COLOR: rgb(255,255,255); FONT-FAMILY: arial, helvetica, sans-serif; COLOR: rgb(0,0,0); FONT-SIZE: 10pt">
<DIV style="RIGHT: auto">Hello,</DIV>
<DIV> </DIV>
<DIV>I'm new to scilab, so please excuse the simple question.  (I had searched a few hours and can't find answer)</DIV>
<DIV style="RIGHT: auto"> </DIV>
<DIV>How do I address part of a string?</DIV>
<DIV> </DIV>
<DIV style="RIGHT: auto">For example:</DIV>
<DIV> </DIV>
<DIV><SPAN id=misspell-5>myString</SPAN> = "<SPAN id=misspell-6>abcdefg</SPAN>"</DIV>
<DIV style="RIGHT: auto">How do I get characters 4:6, which would be"def"?</DIV></DIV></BLOCKQUOTE>Use the part function.<BR><BR>BTW one of the best feature of scilab (compared to <SPAN id=misspell-8>matlab</SPAN>) is it's ability to have matrices of strings (with different sizes) because a string is an object.<BR>When doing <SPAN id=misspell-9>myString</SPAN> = "<SPAN id=misspell-10>abcdefg</SPAN>" you are creating a 1x1 matrix (similarly a=2.3 is matrix).<BR>You can see that by typing <SPAN id=misspell-11>myString</SPAN>(1).<BR>
<BLOCKQUOTE style="RIGHT: auto" type="cite">
<DIV style="BACKGROUND-COLOR: rgb(255,255,255); FONT-FAMILY: arial, helvetica, sans-serif; COLOR: rgb(0,0,0); FONT-SIZE: 10pt">
<DIV> </DIV>
<DIV>Thank you.</DIV>
<DIV style="RIGHT: auto"> </DIV>
<DIV>Jerry<VAR id=yiv1919112185yui-ie-cursor></VAR></DIV></DIV></BLOCKQUOTE><BR></DIV><BR><BR></DIV></DIV></div></body></html>