How do you extract the actual name of your input variable in a function?
조회 수: 2 (최근 30일)
I need to extract the actual name of my input variable for naming a file. Here is my simple script.
and varname is a function defined as such
so if I have an array named 'testbmp' and I type
My output is a .bmp file named 'a.bmp' not 'testbmp.bmp'. This does not make sense to me. Is there a way I can call the actual name of my actual input variable instead of whatever dummy variable I wrote in the function?
Geoff Hayes 2014년 10월 30일
Alex - it does make sense since you are passing a variable named a into your function varname. To get the variable name testbmp, you would have to call inputname(1) from the within the function that "receives" this variable as an input I.e. array2bmp.