I tried looking online for this and can’t find what I am looking for. I am trying to write a script to do something I do a lot. I would like to be able to pass in, as the command argument, the name of a file. Then my script goes off and plots it the way I want. So I need to have a character string as the input to the script. Furthermore I would like to add a check and bail if the input is not a valid character string.
So I want to do something like this… (much appreciated)
Function retval = load_3d(filename)
retval = 1;
if( !(filename is character string)) // or better check if it is a CSV file :)
retval = 0;
Return;
Endif
Bla bla
.
.
.
endfunction