From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Davison Subject: Re: [BABEL] Output with octave Date: Wed, 04 Aug 2010 00:15:18 -0400 Message-ID: <87fwyvrp2h.fsf@stats.ox.ac.uk> References: <87iq45x06e.wl%ucecesf@ucl.ac.uk> <871vai42nz.fsf@stats.ox.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=49085 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OgVO4-0006Ty-3z for emacs-orgmode@gnu.org; Wed, 04 Aug 2010 00:15:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OgVO1-00056q-1I for emacs-orgmode@gnu.org; Wed, 04 Aug 2010 00:15:26 -0400 Received: from markov.stats.ox.ac.uk ([163.1.210.1]:36188) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OgVO0-00056c-Mm for emacs-orgmode@gnu.org; Wed, 04 Aug 2010 00:15:25 -0400 In-Reply-To: (d. tchin's message of "Mon, 2 Aug 2010 09:30:24 +0000 (UTC)") 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: "d.tchin" Cc: emacs-orgmode@gnu.org Hi, d.tchin writes: > Hi, > > Dan Davison stats.ox.ac.uk> writes: > >> >> Eric S Fraga ucl.ac.uk> writes: >> >> > On Fri, 23 Jul 2010 16:59:43 +0000 (UTC), d.tchin voila.fr> > wrote: [...] >> So the current workaround is to say "when using octave, you must end >> your block with a computation, rather than a simple statement of a >> variable name." >> >> Can someone suggest a better solution? >> >> Dan >> >> p.s. Or you could do this >> >> #+begin_src octave :session *out* :var vec=test >> vecb=vec; >> ans=vecb >> #+end_src >> >> #+begin_src octave :session *out* :var vec=test >> vecb=vec; >> ans=vecb >> ans >> #+end_src >> > > > Thank you for the help. I will use it as it works clearly clearly well. > > Following exchange you have with Juan Pechiar related to the way the output > is displayed, I would like to submit the following examples : > > First test : > > > #+tblname: test > | 1 | 2 | 3 | > > #+source: outtest > #+begin_src octave :session *out* :var vec=test :results value vector > vecb=[vec]; > ans=vecb; > #+end_src > > > The output is the following : > > > #+results: outtest > | 1.00000000e+000 2.00000000e+000 3.00000000e+000 | > > > It is considered as one character and each element are not clearly > splitted in table. Certainly handled as string as Juan Pechiar. Thanks for that. It should be fixed now. I have changed octave and matlab so that they now write their data to file using dlmwrite rather than save -ascii. Dan > > > Second test : > > > #+tblname: test > | 1 | 2 | 3 | > > #+source: outtestb > #+begin_src octave :session *out* :var vec=test :results value vector > vecb=[vec;vec]; > ans=vecb; > #+end_src > > > The output is the following : > > #+results: outtestb > | 1.00000000e+000 | 2.00000000e+000 | 3.00000000e+000 | > | 1.00000000e+000 | 2.00000000e+000 | 3.00000000e+000 | > > This time output is splitted in a table as it should be ? > > > > > > > _______________________________________________ > 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