diff -r 975677bf1b8a -r e62bc810999c getting-started-strings/quickref.tex --- a/getting-started-strings/quickref.tex Wed Nov 10 10:24:03 2010 +0530 +++ b/getting-started-strings/quickref.tex Wed Nov 10 10:47:21 2010 +0530 @@ -1,8 +1,8 @@ -Creating a linear array:\\ -{\ex \lstinline| x = linspace(0, 2*pi, 50)|} +Creating a string:\\ +{\ex \lstinline| s = ``Hello World''|} -- Single quotes and triple +quotes can also be used. -Plotting two variables:\\ -{\ex \lstinline| plot(x, sin(x))|} +Accessing individual elements:\\ +{\ex \lstinline| s[5]|} -- Elements can be accessed with their index -Plotting two lists of equal length x, y:\\ -{\ex \lstinline| plot(x, y)|} +Strings are immutable.