[Scilab-users] converting a variable name into a string
Rafael Guerra
jrafaelbguerra at hotmail.com
Tue Dec 6 17:43:53 CET 2016
Hi Christopher,
I do not know the Scilab equivalent but it would be interesting to know for what type of problem you need this feature.
The question seems puzzling at first sight, coz if we know the variable 's' name in order to be able to call f(s), then we should also be able to compose a string "s" by writing it within quotes, shouldn't we?
Regards,
Rafael
-----Original Message-----
From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of christophk
Sent: Tuesday, December 06, 2016 2:43 PM
To: users at lists.scilab.org
Subject: [Scilab-users] converting a variable name into a string
Ok here is another question for the Scilab experts around.
Is there a way to convert the name of a variable into a string in Scilab?
Lets say, I have:
//START OF CODE
s = 2;
//then:
string(s) // returns "2"
//is there a function f with f(s) == "s" ??
//END OF CODE
Searched the web, but could only find a solution for Matlab:
https://se.mathworks.com/matlabcentral/newsreader/view_thread/251347
More information about the users
mailing list