[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] Re: org-babel matlab example
From: |
Dan Davison |
Subject: |
[Orgmode] Re: org-babel matlab example |
Date: |
Sat, 11 Sep 2010 11:29:18 -0400 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) |
etimecowboy <address@hidden> writes:
> Hi everybody,
>
> I am learning to use org-babel to evaluate in-line Matlab code block,
> but I cannot make it works when I press the "C-c C-c", nor "C-c C-v
> e".
What happens when you try C-c C-c or C-c C-v e ? There is an issue with
matlab and octave: they return the value of the last /unassigned/
computation, so simply ending the code block with a variable name "x" is
not enough. Could you try one of the following schemes please, and let
us know if that solves it:
#+begin_src matlab :exports results
n = [1:10];
x = 5*n+4;
ans = x
#+end_src
#+begin_src matlab :exports results
n = [1:10];
x = 5*n+4;
x + 0
#+end_src
> The export of code works, but the results was not there. My in-line code is
> like this:
There was a little typo in your original block: the keyword is
":exports" with an s.
Dan
>
> #+begin_src matlab :export results
> n = [1:10];
> x = 5*n+4;
> x
> #+end_src
>
> Is there someone can provide me a working example? Thanks a lot.
>
>
> -----------------------------
>
> address@hidden
>
> _.,----,._
> .:' `:.
> .' `.
> .' `.
> : :
> ` .'`':'`'`/ '
> `. \ | / ,'
> \ \ | / /
> `\_..,,.._/'
> {`'-,_`'-}
> {`'-,_`'-}
> {`'-,_`'-}
> `YXXXXY'
> ~^^~
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> address@hidden
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
- [Orgmode] org-babel matlab example, etimecowboy, 2010/09/11
- [Orgmode] Re: org-babel matlab example,
Dan Davison <=
- [Orgmode] Re: org-babel matlab example, Dan Davison, 2010/09/11
- [Orgmode] Re: org-babel matlab example, etimecowboy, 2010/09/12
- Re: [Orgmode] Re: org-babel matlab example, Darlan Cavalcante Moreira, 2010/09/13
- Re: [Orgmode] Re: org-babel matlab example, Dan Davison, 2010/09/14
- [Orgmode] Re: org-babel matlab example, Achim Gratz, 2010/09/14
- [Orgmode] Re: org-babel matlab example, Achim Gratz, 2010/09/14
- Re: [Orgmode] Re: org-babel matlab example, Darlan Cavalcante Moreira, 2010/09/14
- Re: [Orgmode] Re: org-babel matlab example, etimecowboy, 2010/09/15
- [Orgmode] Re: org-babel matlab example, Dan Davison, 2010/09/16