* formated result from matlab code?
@ 2011-02-04 17:58 Piter_
0 siblings, 0 replies; only message in thread
From: Piter_ @ 2011-02-04 17:58 UTC (permalink / raw)
To: emacs-orgmode
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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-02-04 17:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-04 17:58 formated result from matlab code? Piter_
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).