From mboxrd@z Thu Jan 1 00:00:00 1970 From: Piter_ Subject: formated result from matlab code? Date: Fri, 4 Feb 2011 18:58:54 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from [140.186.70.92] (port=37384 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PlPvs-0006xh-Vt for emacs-orgmode@gnu.org; Fri, 04 Feb 2011 12:58:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PlPvr-0003a9-DG for emacs-orgmode@gnu.org; Fri, 04 Feb 2011 12:58:56 -0500 Received: from mail-qw0-f41.google.com ([209.85.216.41]:50649) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PlPvr-0003Zo-7d for emacs-orgmode@gnu.org; Fri, 04 Feb 2011 12:58:55 -0500 Received: by qwa26 with SMTP id 26so1984612qwa.0 for ; Fri, 04 Feb 2011 09:58:54 -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 Hi all I try to output some formated text using matlab source code block. for example ----------------------example1-cut---------------------- #+begin_src matlab :output file :file fit_parameters.txt ki1=fopen('fit_parameters.txt','w'); fprintf(ki1,' Fit of the blabla \n ') fprintf(ki1,' amplitude: %.3g, uM \n',1) fprintf(ki1,' T*amplitude: %.3g, uM \n',1) fprintf(ki1,' Rsquare adjusted %.3g \n' ,0.99) fclose(ki1); #+end_src ----------------------cut------------------------------ but as result I get a file with single "0". And this example works well. ----------------------example2 cut---------------------- #+begin_src matlab :output file :file chart.tiff figure plot(rand(1,10)) print -dtiff chart.tiff #+end_src ----------------------cut------------------------------ I have think I don't understand something basic. Or maybe someone can explain me how to get formated output in results slimilar to output below: #+results: amplitude: 8.05, uM T*amplitude: 8.02, uM T+amplitude: 0.0368, uM k(triplet decay): 1.66e+05 k(triplet to heme c): 4.13e+06 k(heme c to triplet): 4.54e+06 k(heme c to groung): 183 Thanks Petro.