Re: [O] workflow, matlab+latex in org file

2017-10-20 Thread Uwe Brauer
> Here I obtain the following error: > Debugger entered--Lisp error: (void-function org-babel-execute:matlab) > org-babel-execute:matlab("x = [1, 2, 3, 4, 5];\nfprintf('|%d', x)" > ((:colname-names) (:rowname-names) (:result-params "replace" "output" > "drawer")

Re: [O] workflow, matlab+latex in org file

2017-10-20 Thread Uwe Brauer
>>> "John" == John Kitchin writes: This message is from July, but meanwhile I upgraded to Ubuntu 16.04 matlab 2016b which includes the python engine/kernel and finally I installed the Jupiter matlab kernel via pip, however I tried to follow your recommendations below:

Re: [O] workflow, matlab+latex in org file

2017-03-11 Thread Scott Randby
On 03/10/2017 04:15 PM, Uwe Brauer wrote: > >> On 03/10/2017 11:08 AM, Uwe Brauer wrote: > >> You need to change "#+BEGIN_LaTeX" to "#+begin_export latex" and >> "#+END_LaTeX" to "#+end_export" for Org 9.0 and above. > > Thanks, very much, I never understand what is the benefit of

Re: [O] workflow, matlab+latex in org file

2017-03-11 Thread John Kitchin
You can put them into an elisp src block to try it out. They have to go in an init file to be permanent. I just made a symlink to the matlab executable on my path. The ipython functions are defined in ob-ipython, https://github.com/gregsexton/ob-ipython I think. John

Re: [O] workflow, matlab+latex in org file

2017-03-11 Thread Uwe Brauer
>>> "John" == John Kitchin writes: > The kernel provides a "session" so matlab stays alive and doesn't have to > restart on every block. > The kernel might require python3. Although I think I installed the kernel, I am not sure about the code you sent me,

Re: [O] workflow, matlab+latex in org file

2017-03-11 Thread Uwe Brauer
> The kernel provides a "session" so matlab stays alive and doesn't have to > restart on every block. Ah ok like the matlab shell as in emacs matlab mode. It seems that I got it to work, there was a python lib conflict but the author released just a new version solving the problem. >

Re: [O] workflow, matlab+latex in org file

2017-03-11 Thread John Kitchin
The kernel provides a "session" so matlab stays alive and doesn't have to restart on every block. The kernel might require python3. On Sat, Mar 11, 2017 at 9:20 AM Uwe Brauer wrote: > >> You might dig around in ob-octave to see how it works. It should be > able >> to

Re: [O] workflow, matlab+latex in org file

2017-03-11 Thread Uwe Brauer
> You might dig around in ob-octave to see how it works. It should be able > to Matlab (and on Linux/Mac I believe it might). On Windows, it has been > broken for a long time due to the lack of a proper shell (maybe that can > be adapted in win10 though). > I vaguely recall making

Re: [O] workflow, matlab+latex in org file

2017-03-11 Thread Uwe Brauer
>>> "Eric" == Eric S Fraga writes: > On Saturday, 11 Mar 2017 at 08:04, Uwe Brauer wrote: >> Does anybody know how to get a better formatted output, to get rid of >> the empty lines and newline? best would be a org-table? > Instead of relying on MATLAB's

Re: [O] workflow, matlab+latex in org file

2017-03-11 Thread John Kitchin
You might dig around in ob-octave to see how it works. It should be able to Matlab (and on Linux/Mac I believe it might). On Windows, it has been broken for a long time due to the lack of a proper shell (maybe that can be adapted in win10 though). I vaguely recall making that matlab function to

Re: [O] workflow, matlab+latex in org file

2017-03-11 Thread Eric S Fraga
On Saturday, 11 Mar 2017 at 08:04, Uwe Brauer wrote: > Does anybody know how to get a better formatted output, to get rid of > the empty lines and newline? best would be a org-table? Instead of relying on MATLAB's default output, you can generate formatted output using fprintf [1]. Footnotes:

Re: [O] workflow, matlab+latex in org file

2017-03-11 Thread Uwe Brauer
> On Friday, 10 Mar 2017 at 16:08, Uwe Brauer wrote: > [...] > You may need to add ":exports results" to the src line. > Also, you should also modify the code to wrap the output in an equation > environment: > disp('\begin{equation}') > disp(ltxjac) >

Re: [O] workflow, matlab+latex in org file

2017-03-10 Thread Uwe Brauer
>>> "John" == John Kitchin writes: > I get the right wrapper around the results block in the org-file. I did > have to add :exports results > to the header to get it to export though. Thanks ok the whole message you sent me I can now copy into a org file and

Re: [O] workflow, matlab+latex in org file

2017-03-10 Thread John Kitchin
I get the right wrapper around the results block in the org-file. I did have to add :exports results to the header to get it to export though. John --- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University

Re: [O] workflow, matlab+latex in org file

2017-03-10 Thread Uwe Brauer
> On 03/10/2017 11:08 AM, Uwe Brauer wrote: > You need to change "#+BEGIN_LaTeX" to "#+begin_export latex" and > "#+END_LaTeX" to "#+end_export" for Org 9.0 and above. Thanks, very much, I never understand what is the benefit of those changes which break backward compatibility (or

Re: [O] workflow, matlab+latex in org file

2017-03-10 Thread Uwe Brauer
> On Friday, 10 Mar 2017 at 16:08, Uwe Brauer wrote: > [...] > You may need to add ":exports results" to the src line. > Also, you should also modify the code to wrap the output in an equation > environment: > disp('\begin{equation}') > disp(ltxjac) >

Re: [O] workflow, matlab+latex in org file

2017-03-10 Thread Eric S Fraga
On Friday, 10 Mar 2017 at 16:08, Uwe Brauer wrote: "John" == John Kitchin writes: > > Hi John, > > Quite some time ago you send me this code of yours. It somehow > disappeared in my mail and only by now I tried it out, great, really > > Only one question > I copied

Re: [O] workflow, matlab+latex in org file

2017-03-10 Thread Scott Randby
On 03/10/2017 11:08 AM, Uwe Brauer wrote: "John" == John Kitchin writes: > > Hi John, > > Quite some time ago you send me this code of yours. It somehow > disappeared in my mail and only by now I tried it out, great, really > > Only one question > I copied your

Re: [O] workflow, matlab+latex in org file

2017-03-10 Thread Uwe Brauer
>>> "John" == John Kitchin writes: Hi John, Quite some time ago you send me this code of yours. It somehow disappeared in my mail and only by now I tried it out, great, really Only one question I copied your code in a org file, executed the src sections and obtained:

Re: [O] workflow, matlab+latex in org file

2016-07-12 Thread Uwe Brauer
>>> "Eric" == Eric S Fraga writes: > On Monday, 11 Jul 2016 at 12:32, Uwe Brauer wrote: >> Hello >> >> I want in a org file, to include matlab code and run it (that I know how >> to do) >> >> Then I want certain results, which are symbolic variables,

Re: [O] workflow, matlab+latex in org file

2016-07-11 Thread Eric S Fraga
On Monday, 11 Jul 2016 at 12:32, Uwe Brauer wrote: > Hello > > I want in a org file, to include matlab code and run it (that I know how > to do) > > Then I want certain results, which are symbolic variables, expressed in > latex, we I achieve using matlab's latex command. > > Like > > #+begin_src

Re: [O] workflow, matlab+latex in org file

2016-07-11 Thread Uwe Brauer
>>> "John" == John Kitchin writes: > You might consider the alternative, no-frills approach below. I defined > a new execute function that strips the header and >> out of the output. > It won't support any kind of session or header variables, but if you >

Re: [O] workflow, matlab+latex in org file

2016-07-11 Thread John Kitchin
You might consider the alternative, no-frills approach below. I defined a new execute function that strips the header and >> out of the output. It won't support any kind of session or header variables, but if you don't use those it might work for you. #+BEGIN_SRC emacs-lisp (defun

Re: [O] workflow, matlab+latex in org file

2016-07-11 Thread Uwe Brauer
>>> "John" == John Kitchin writes: > Here is an example using sympy. I think you will have to wrap the matlab > output in $$ yourself if that is what you want. Right. Using your example I obtain: , | | | < M A T L A B (R) > |

Re: [O] workflow, matlab+latex in org file

2016-07-11 Thread John Kitchin
Here is an example using sympy. I think you will have to wrap the matlab output in $$ yourself if that is what you want. Otherwise, the :exports header below specifies to only export the results, and the :results header wraps the output in a latex environment. #+BEGIN_SRC python :results output

Re: [O] workflow, matlab+latex in org file

2016-07-11 Thread Uwe Brauer
>>> "Ken" == Ken Mankoff writes: > I can't execute your code, Why not > but what does ":results output latex" show? > And what if you add the ";" to each line so it is not printed, except > the last, which is perhaps explicitly printed? You are right! Thanks.

[O] workflow, matlab+latex in org file

2016-07-11 Thread Uwe Brauer
Hello I want in a org file, to include matlab code and run it (that I know how to do) Then I want certain results, which are symbolic variables, expressed in latex, we I achieve using matlab's latex command. Like #+begin_src matlab :results output clear all syms e p R g w K K2 phi=[(e +