creating storage box in gui

1 回表示 (過去 30 日間)
Steven Chong
Steven Chong 2015 年 6 月 9 日
コメント済み: Walter Roberson 2015 年 6 月 9 日
If i want to store information or file using gui ,can i use the listbox in gui to function as a storing location like a database storage?

採用された回答

Walter Roberson
Walter Roberson 2015 年 6 月 9 日
Yes, provided that all the values you want stored are strings.
You may wish to look at the UserData tag that all graphics objects have, and you may wish to look at guidata() and at setappdata() / getappdata()
  2 件のコメント
Steven Chong
Steven Chong 2015 年 6 月 9 日
So if the file i wanted to store are audio file using .wav format will not be allowed?
Walter Roberson
Walter Roberson 2015 年 6 月 9 日
If you try to set() the String as a 2D array of numeric values, it will be unhappy and may throw the values away.
If you set() the array as a vector (row or column) of numeric values, then it will convert each entry to printable form using a '%.7g' format or similar, making the list a list of strings each containing the printable representation of one sample. You can get() the String array and index into it to fetch the printable values and convert them back into numbers.
If you want to store real numeric data against an object then use UserData or one of the other suggestions I gave. The String property of uicontrol get automatically altered from numeric form as a convenience to users.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by