getting-started-strings/quickref.tex
changeset 436 e62bc810999c
parent 313 b9b7bfce773e
equal deleted inserted replaced
435:975677bf1b8a 436:e62bc810999c
     1 Creating a linear array:\\
     1 Creating a string:\\
     2 {\ex \lstinline|    x = linspace(0, 2*pi, 50)|}
     2 {\ex \lstinline|    s = ``Hello World''|} -- Single quotes and triple
       
     3 quotes can also be used.  
     3 
     4 
     4 Plotting two variables:\\
     5 Accessing individual elements:\\
     5 {\ex \lstinline|    plot(x, sin(x))|}
     6 {\ex \lstinline|   s[5]|} -- Elements can be accessed with their index
     6 
     7 
     7 Plotting two lists of equal length x, y:\\
     8 Strings are immutable. 
     8 {\ex \lstinline|    plot(x, y)|}