From: Piter_ <x.piter@gmail.com>
To: emacs-orgmode@gnu.org
Subject: formated result from matlab code?
Date: Fri, 4 Feb 2011 18:58:54 +0100 [thread overview]
Message-ID: <AANLkTi=xeSXy_PVpiqfLix7VbPm0BG6vwYLaf6k3uFz3@mail.gmail.com> (raw)
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.
reply other threads:[~2011-02-04 17:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTi=xeSXy_PVpiqfLix7VbPm0BG6vwYLaf6k3uFz3@mail.gmail.com' \
--to=x.piter@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).