input to structures

6 visualizaciones (últimos 30 días)
Özgür Karagülle
Özgür Karagülle el 20 de Mayo de 2012
Domain.x='xxxxx';
Domain.y='18 May 2012';
Domain.z='zzz';
Domain.t='tttttt';
Hi, i know how i make structure like up. But i dont know how i can use input function and take "x","y","z","t" variables from users with my GUI ?

Respuesta aceptada

per isakson
per isakson el 20 de Mayo de 2012

Más respuestas (1)

Walter Roberson
Walter Roberson el 20 de Mayo de 2012
thisfieldname = input('Enter the field you want to change','s');
thisval = input(['Enter the value you want to associate with ' thisfieldname]);
Domain.(thisfieldname) = thisval;
  2 comentarios
Özgür Karagülle
Özgür Karagülle el 20 de Mayo de 2012
thank you for answer. so i will all use this function each of ( x,y,z,t) ?
Özgür Karagülle
Özgür Karagülle el 20 de Mayo de 2012
i am sorry i ask wrong :( i want to learn i will create structures of
Domain.Name, Domain.Expire, Domain.Owner and taking the variables for this structures and then show with a simple gui ?

Iniciar sesión para comentar.

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