Let's say I have a variable g
in my GNU Octave workspace. How can I rename it to f
?
I tried using the rename
function but I believe it is for another purpose.
Yeah, rename
is for files on the filesystem. To "rename" a variable, just assign it to a new variable and clear the old one.
f = g;
clear g