How to create a structure with a name speficied by user in inputdlg?

3 visualizaciones (últimos 30 días)
So I ask what is the name of the structure in an inputdlg, the result is a cell array. The field is named always 'Course' and I want to create a structure named specifiedname.Course=[].
Is it possible to do?
  1 comentario
Image Analyst
Image Analyst el 6 de Feb. de 2013
Why would you want to do that? It would just complicate your program, though I think you can do it with dynamic structure names, but again, it's just unnecessary complication.

Iniciar sesión para comentar.

Respuestas (1)

Dan K
Dan K el 6 de Feb. de 2013
Folks, please don't crucify me for this one, but the easiest way I see to do it is:
eval([specifiedname '.Course = []']);

Categorías

Más información sobre Structures 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