emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] [Babel] Output of multiple variables from octave source


From: Eric Schulte
Subject: Re: [Orgmode] [Babel] Output of multiple variables from octave source
Date: Wed, 05 Jan 2011 17:54:53 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Hi,

I haven't used octave myself so I can't be certain, but using the
=:results output= header should result in the behavior you are
describing.  e.g.

  #+srcname: test.m
  #+begin_src octave :results output
  clear variables
  x=5.1;
  y=3*x;
  sprintf('x=%.1f',x)
  sprintf('y=%.1f',y)
  #+end_src

see http://orgmode.org/manual/results.html

Cheers -- Eric

RCY <address@hidden> writes:

> Hi,
>  I would like to output multiple variables from an octave program. When I
> evaluate:
>
>       #+srcname: test.m
>       #+begin_src octave
>       clear variables
>       x=5.1;
>       y=3*x;
>       sprintf('x=%.1f',x)
>       sprintf('y=%.1f',y)
>       #+end_src
>
> I get
>       #+results: test.m
>       : y=15.3
>
> Is there a way to get multiple variables output, other than something like:
> #+srcname: test.m
>       #+begin_src octave
>       clear variables
>       x=5.1;
>       y=3*x;
>       sprintf('x=%.1f,\n y=%.1f',x,y)
>       #+end_src
>
>       #+results: test.m
>       : x=5.1, y=15.3
>
> which starts to get unwieldy for a larger number of variables.
>
> I am using the org-mode from git in Emacs 23.1.
>
> Thanks for any help.
> RC
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> address@hidden
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode



reply via email to

[Prev in Thread] Current Thread [Next in Thread]