emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Dan Davison <davison@stats.ox.ac.uk>
To: etimecowboy <etimecowboy@googlemail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-babel matlab example
Date: Thu, 16 Sep 2010 07:32:09 +0100	[thread overview]
Message-ID: <87sk1a2lna.fsf@stats.ox.ac.uk> (raw)
In-Reply-To: <20100916.043549.1940667233564352085.etimecowboy@gmail.com> (etimecowboy@googlemail.com's message of "Thu, 16 Sep 2010 04:35:49 +0100 (BST)")

etimecowboy <etimecowboy@googlemail.com> writes:

> Hi everyone,
>
> It seems that my org used the Octave program to evaluate my Matlab
> code block/generate figures, not Matlab itself.

Hmm, shouldn't do. Could you post your example? Have you activated both
octave and matlab? What is the value of your org-babel-load-languages?

For me C-c C-c and C-c C-v e on

#+begin_src matlab
1+1
#+end_src

result in

/bin/bash: matlab: command not found

You can confirm which language is running by using the "version"
command. Here's what I get (note I have to run matlab on a remote
computer because I don't have it on my laptop).

--8<---------------cut here---------------start------------->8---
#+begin_src octave :results output
version
#+end_src

#+results:
: ans = 3.2.4

#+begin_src matlab :dir /ddavison@tombstone.princeton.edu:/ :results output
version
#+end_src

#+results:
#+begin_example

The default version of Matlab in /usr/licensed/bin is matlab-R2009b

The following versions are available in /usr/licensed/bin:
     matlab-R2009b
   matlab-R2009a
   matlab-R2008b
Warning: No display specified.  You will not be able to display graphics on the screen.

                            < M A T L A B (R) >
                  Copyright 1984-2009 The MathWorks, Inc.
                 Version 7.9.0.529 (R2009b) 64-bit (sol64)
                              August 12, 2009

 
  To get started, type one of these: helpwin, helpdesk, or demo.
  For product information, visit www.mathworks.com.
 
>> >> 
ans =

7.9.0.529 (R2009b)

>> >> 
#+end_example
--8<---------------cut here---------------end--------------->8---



> I found this when comparing the exported figure by org with the figure generated by Matlab. I also found that I cannot use org-babel on an Windows PC which has Matlab installed, but not Octave.

In general we would appreciate any notes on problems encountered when
running Org-babel on Windows.

dan

>
> Could someone show me how to use Matlab program to evaluate Matlab code blocks in org files in both Linux and Windows OS? Maybe it should be some settings in my .emacs file?
>
> Thanks again.
>   
> -----------------------------
>
> etimecowboy@gmail.com
>
>       _.,----,._
>     .:'        `:.
>   .'              `.
>  .'                `.
>  :                  :
>  `    .'`':'`'`/    '
>   `.   \  |   /   ,'
>     \   \ |  /   /
>      `\_..,,.._/'
>       {`'-,_`'-}
>       {`'-,_`'-}
>       {`'-,_`'-}
>        `YXXXXY'
>          ~^^~
>
> _______________________________________________
> 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

      reply	other threads:[~2010-09-16  7:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-11  9:18 org-babel matlab example etimecowboy
2010-09-11 15:29 ` Dan Davison
2010-09-11 16:23   ` Dan Davison
2010-09-12  7:45     ` etimecowboy
2010-09-12 14:58       ` Darlan Cavalcante Moreira
2010-09-14 15:40         ` Dan Davison
2010-09-14 18:19           ` Achim Gratz
2010-09-14 20:14             ` Achim Gratz
2010-09-14 18:23           ` Darlan Cavalcante Moreira
2010-09-16  3:35             ` etimecowboy
2010-09-16  6:32               ` Dan Davison [this message]

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=87sk1a2lna.fsf@stats.ox.ac.uk \
    --to=davison@stats.ox.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=etimecowboy@googlemail.com \
    /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).