This might be a very bizarre question (and probably I might be advised against doing such a weird thing) but if I have a string as in v_str ='var_name' and I want to transform the contents of that code into the actual code, is that possible in MATLAB? As in:
v_str = 'var_name'
x = make_string_to_code(v_str)
translates to the functioning code:
x = var_name
which simply transforms the string to actual code.
The only way I thought of doing this is by writing a file with that code and then on the next line executing that fine, but I wanted to avoid writing files every time that I want to do this.
Also, why is this so not recommended? Why is it so bad?