2 Questions: list of variables & long lines

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

2 Questions: list of variables & long lines

Noel H. Bell

I have two questions:

1. Is there an easy way to get a list of user-defined variables and
   their current values?  "who" prints out the variable names but
   not values.

2. When defining a variable, is there a line continuation character?  A
   single back-slash does not work and a carriage return causes a parse
   error also.  I would like this so that I can get decent looking
   printouts of my m-files.

Thanks for any help or pointers to the manual.

Noel Bell
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: 2 Questions: list of variables & long lines

John C. Campbell-2

| I have two questions:

Well, I'll answer one of them...

| 2. When defining a variable, is there a line continuation character?  A
|    single back-slash does not work and a carriage return causes a parse
|    error also.  I would like this so that I can get decent looking
|    printouts of my m-files.

Using ... allows continuation.

octave:1> A = [ 1 2 ...
> 3 4 ]

A =

  1  2  3  4

as oppossed to

octave:1> A = [ 1 2
> 3 4 ]

A =

  1  2
  3  4