equal
deleted
inserted
replaced
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)|} |
|