[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to return variables from oct-file commands?
From: |
Ben Abbott |
Subject: |
Re: How to return variables from oct-file commands? |
Date: |
Sat, 17 Aug 2013 10:43:36 -0400 |
On Aug 17, 2013, at 10:36 AM, Lukas Reichlin wrote:
> Dear Octave Community
>
> How can I create variables from a command (written as a C++ oct-file) without
> specifying a left-hand-side? Instead of
>
> [a, b, c] = syms ("a", "b", "c")
>
> I wish to write
>
> syms a b c
>
> where command "syms" should create/return the variables a, b and c in the
> current workspace. Do you know an Octave command which could serve as a code
> example?
>
> Thanks for any hints and best regards
> Lukas
If I understand what you're hoping to do, assignin() looks to do what you want
and is implemented as an oct-file.
which assignin
'assignin' is a built-in function from the file
libinterp/parse-tree/oct-parse.cc
Ben