Have you an example like phonebook

8 Ansichten (letzte 30 Tage)
Özgür Karagülle
Özgür Karagülle am 20 Mai 2012
Hello from Turkey, I am working on a project. i search from google but i can't find any example like : a phone book. For example there are name,phonenumber,address in matlabphonebook. User enter input variables ( name,phonenumber,address) and when i press to myphonelist from gui , it will display all of phonelist.. Thank you for your answer
  4 Kommentare
Walter Roberson
Walter Roberson am 20 Mai 2012
Oh, How do you solve a problem like a phonebook?
How do you hold an structure in your hand?
Özgür Karagülle
Özgür Karagülle am 20 Mai 2012
i want to make a script file with matlab. in the script : it will ask user to name,surname,phonenumber etc(so it's a structure) and save this data to structure ??

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Walter Roberson
Walter Roberson am 20 Mai 2012
Fields = fieldnames(PHONE);
Content = struct2cell(PHONE) .';
uitable('Data', Content, 'ColumnName', Fields);
  3 Kommentare
Walter Roberson
Walter Roberson am 20 Mai 2012
Read the documentation on fieldnames() and struct2cell() and uitable(). Experiment with the code using a PHONE structure array that you have created.
I have already shown you the input() command for reading input from the user.
Walter Roberson
Walter Roberson am 21 Mai 2012
thisname = input('Enter the name', 's');
thisnumber = input('Enter the phone number','s');
thisaddress = input('Enter the address','s');
PHONE.name = thisname; PHONE.number = thisnumber; PHONE.address = thisaddress;

Melden Sie sich an, um zu kommentieren.


Özgür Karagülle
Özgür Karagülle am 22 Mai 2012
thank you very much, it was clean answer , i did something with your answer. i am calling PHONE and it ask name, phone number, address so User can enter this informations. But when i call PHONE again, previous informations is deleting. how i can storage all of entering ?

Kategorien

Mehr zu Call Python from MATLAB finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by