Borrar filtros
Borrar filtros

How to read in names of function input arguments as strings?

1 visualización (últimos 30 días)
Rinu
Rinu el 24 de Nov. de 2013
Comentada: Rinu el 24 de Nov. de 2013
Is there any way I can read in the names of input arguments of function m-files as strings? I have a function m-file: function ([inarg1 inarg2 inarg3]) ... I need the names of the input arguments to display in the output plot. Thanks!

Respuesta aceptada

Matt J
Matt J el 24 de Nov. de 2013
doc inputname
  2 comentarios
Walter Roberson
Walter Roberson el 24 de Nov. de 2013
Do you want the names of the variables that users passed in to the call, or do you want to know, "for this function I am executing now, what the names are that I gave the the dummy arguments" (e.g., for producing help information) ?
Rinu
Rinu el 24 de Nov. de 2013
Actually, I want my function file to accept an array of filenames as input arguments. I'm using fopen to read in the data of each file. I want to generate a plot using data contained in each input file and I want to output the filenames along with the corresponding plot.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre String Parsing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by