Ask Your Question

Revision history [back]

I tried your example on cloud.sagemath.com, by opening a new terminal, typing "octave", and copy-pasting the line you gave. This produced an ascii-art plot of "y = x^2" in the required range.

~/2014-07-07$ octave
GNU Octave, version 3.8.1
Copyright (C) 2014 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type 'warranty'.

Octave was configured for "x86_64-pc-linux-gnu".

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/get-involved.html

Read http://www.octave.org/bugs.html to learn how to submit bug reports.
For information about changes from previous versions, type 'news'.

warning: function /usr/share/octave/packages/strings-1.1.0/strjoin.m shadows a core library fu
nction
warning: function /usr/share/octave/packages/strings-1.1.0/base64encode.m shadows a core libra
ry function
warning: function /usr/share/octave/packages/strings-1.1.0/base64decode.m shadows a core libra
ry function
warning: dx does not seem to be present some functionalities will be disabled
warning: function /usr/share/octave/packages/specfun-1.1.0/ellipke.m shadows a core library fu
nction
warning: function /usr/share/octave/packages/specfun-1.1.0/erfcinv.m shadows a built-in functi
on
warning: function /usr/share/octave/packages/specfun-1.1.0/expint.m shadows a core library fun
ction
warning: function /usr/lib/x86_64-linux-gnu/octave/packages/specfun-1.1.0/x86_64-pc-linux-gnu-
api-v49+/ellipj.oct shadows a built-in function
octave:1> x = 1:10; figure, plot(x,x.^2)
+--------------------------------------------------------------------------------------------+
|                                                                                            |
|100 ++---------------+----------------+----------------+----------------+---------------++  |
|    +-----------------------------------------------------------------------------------++  |
|    |                                                                                  -||  |
|    |                                                                                -- ||  |
|    |                                                                               -   ||  |
|    |                                                                              -    ||  |
|    |                                                                             -     ||  |
|    |                                                                            +      ||  |
| 80 |+                                                                          -       |+  |
|    |                                                                         --        ||  |
|    |                                                                        -          ||  |
|    |                                                                       -           ||  |
|    |                                                                     --            ||  |
|    |                                                                    -              ||  |
|    |                                                                   +               ||  |
| 60 |+                                                                --                |+  |
|    |                                                               --                  ||  |
|    |                                                              -                    ||  |
|    |                                                            --                     ||  |
|    |                                                           +                       ||  |
|    |                                                         --                        ||  |
|    |                                                       --                          ||  |
|    |                                                     --                            ||  |
| 40 |+                                                  --                              |+  |
|    |                                                 -+                                ||  |
|    |                                               --                                  ||  |
|    |                                             --                                    ||  |
|    |                                           --                                      ||  |
|    |                                         -+                                        ||  |
|    |                                       --                                          ||  |
| 20 |+                                    --                                            |+  |
|    |                                   --                                              ||  |
|    |                                -+-                                                ||  |
|    |                             ---                                                   ||  |
|    |                           --                                                      ||  |
|    |                     ----+-                                                        ||  |
|    |              --+----                                                              ||  |
|    |          ----  +                +                +                +               |+  |
|  0 +-----------------------------------------------------------------------------------++  |
|    0                2                4                6                8               10  |
+--------------------------------------------------------------------------------------------+
octave:2>