Have you an example like phonebook

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

Walter Roberson
Walter Roberson 2012년 5월 20일
http://www.mathworks.com/matlabcentral/fileexchange/24861
Özgür Karagülle
Özgür Karagülle 2012년 5월 20일
thank you for your answer but i couldn't find how i can taking variables of PHONE.name , PHONE.phonenumber, PHONE.address structure from user and display all entering variables by user ??
Walter Roberson
Walter Roberson 2012년 5월 20일
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 2012년 5월 20일
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 ??

댓글을 달려면 로그인하십시오.

답변 (2개)

Walter Roberson
Walter Roberson 2012년 5월 20일

0 개 추천

Fields = fieldnames(PHONE);
Content = struct2cell(PHONE) .';
uitable('Data', Content, 'ColumnName', Fields);

댓글 수: 3

Özgür Karagülle
Özgür Karagülle 2012년 5월 20일
i don't understand this method :( could you explain more ? please
Walter Roberson
Walter Roberson 2012년 5월 20일
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 2012년 5월 21일
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;

댓글을 달려면 로그인하십시오.

Özgür Karagülle
Özgür Karagülle 2012년 5월 22일

0 개 추천

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 ?

카테고리

도움말 센터File Exchange에서 Call Python from MATLAB에 대해 자세히 알아보기

제품

질문:

2012년 5월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by