Do you mean like this?
>> a = "test"
a = test
>> b = "rest "
b = rest
>> a = union(b, a)
a = erst
>> help union
'union' is a function from the file C:\Octave\Octave-4.0.3\share\octave\4.0
.3\m\set\union.m
-- Function File: C = union (A, B)
-- Function File: C = union (A, B, "rows")
-- Function File: [C, IA, IB] = union (...)
Return the unique elements that are in either A or B sorted in
ascending order.
Update:
I'm not aware of such function. There are bunch of built in functions for internal use, that have the names like __func_name__
and you may get a list of them if you type __ in the Octave's command window and press tab twice. At a glance I don't think there is a function, like the one you need, but take a more detailed look if you like.
Can you describe why do you need such behavior, maybe there is a different approach that can suit your needs i.e there are functions for programmatic creation of variables - genvarname
.