From mboxrd@z Thu Jan 1 00:00:00 1970 From: RCY Subject: [Babel] Output of multiple variables from octave source Date: Thu, 30 Dec 2010 15:31:42 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0850494738==" Return-path: Received: from [140.186.70.92] (port=46741 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PYPA2-0004MI-Pw for emacs-orgmode@gnu.org; Thu, 30 Dec 2010 15:31:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PYP9z-0000fG-VL for emacs-orgmode@gnu.org; Thu, 30 Dec 2010 15:31:46 -0500 Received: from mail-yx0-f169.google.com ([209.85.213.169]:39255) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PYP9z-0000eK-Of for emacs-orgmode@gnu.org; Thu, 30 Dec 2010 15:31:43 -0500 Received: by yxl31 with SMTP id 31so5264235yxl.0 for ; Thu, 30 Dec 2010 12:31:42 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --===============0850494738== Content-Type: multipart/alternative; boundary=00163630efa3d2b0ad0498a69251 --00163630efa3d2b0ad0498a69251 Content-Type: text/plain; charset=ISO-8859-1 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 --00163630efa3d2b0ad0498a69251 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,
=A0I would like to output multiple variables from an octave program.= When I evaluate:

=A0=A0=A0=A0=A0 #+srcname: test.m
=A0=A0=A0=A0= =A0 #+begin_src octave
=A0=A0=A0=A0=A0 clear variables
=A0=A0=A0=A0= =A0 x=3D5.1;
=A0=A0=A0=A0=A0 y=3D3*x;
=A0=A0=A0=A0=A0 sprintf('x= =3D%.1f',x)
=A0=A0=A0=A0=A0 sprintf('y=3D%.1f',y)
=A0=A0=A0=A0=A0 #+end_src<= br>
I get=A0 =A0=A0=A0=A0
=A0=A0=A0=A0=A0 #+results: test.m
=A0= =A0=A0=A0=A0 : y=3D15.3

Is there a way to get multiple variables ou= tput, other than something like:
#+srcname: test.m
=A0=A0=A0=A0=A0 #+begin_src octave
=A0=A0=A0=A0=A0 clear variables
= =A0=A0=A0=A0=A0 x=3D5.1;
=A0=A0=A0=A0=A0 y=3D3*x;
=A0=A0=A0=A0=A0 spr= intf('x=3D%.1f,\n y=3D%.1f',x,y)
=A0=A0=A0=A0=A0 #+end_src
= =A0=A0=A0=A0=A0
=A0=A0=A0=A0=A0 #+results: test.m
=A0=A0=A0=A0=A0 : = x=3D5.1, y=3D15.3
=A0=A0=A0=A0=A0
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.
R= C

--00163630efa3d2b0ad0498a69251-- --===============0850494738== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============0850494738==--