From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: [Babel] Output of multiple variables from octave source Date: Wed, 05 Jan 2011 17:54:53 -0700 Message-ID: <8739p6j1gi.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=47925 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pae85-0004rL-PJ for emacs-orgmode@gnu.org; Wed, 05 Jan 2011 19:55:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pae84-0007rj-9l for emacs-orgmode@gnu.org; Wed, 05 Jan 2011 19:55:01 -0500 Received: from mail-iy0-f169.google.com ([209.85.210.169]:57653) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pae84-0007rf-3A for emacs-orgmode@gnu.org; Wed, 05 Jan 2011 19:55:00 -0500 Received: by iyj17 with SMTP id 17so16253801iyj.0 for ; Wed, 05 Jan 2011 16:54:59 -0800 (PST) In-Reply-To: (RCY's message of "Thu, 30 Dec 2010 15:31:42 -0500") 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: RCY Cc: emacs-orgmode@gnu.org 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 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. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode