emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] octave table string conversion


From: Jan-Mark Batke
Subject: [O] octave table string conversion
Date: Mon, 12 Feb 2018 11:36:59 +0100

Hi all,
is there any way to prevent org from converting table elements to a string when used as a variable in an octave source block?

Example: I have

#+name: P_C
| 2/3 | 1/3 |
| 1/4 | 3/4 |

and I want to use that values inside an octave script, say

#+BEGIN_SRC octave :exports both :results output :var PC = P_C
     P_C = PC;       

PC is a matrix of strings, namely
PC=[['2/3','1/3']; ['1/4','3/4']];

evaluating PC inside octave does not help since the column field information is lost 2/3 and 1/3 are concatenated.

so I want 2/3 and so on literally imported to PC (without quotes).
Otherwise there might be a clever way to evaluate the expressions before importing them using elisp?
Best
Jan-Mark



reply via email to

[Prev in Thread] Current Thread [Next in Thread]