How to store continuous data from Matlab GUI.

2 ビュー (過去 30 日間)
gdz
gdz 2023 年 6 月 12 日
回答済み: Abhinaya Kennedy 2024 年 9 月 24 日
Hi,
I have built a matlab gui that read the data obtaining from Simulink. The matlab gui do some calculation and store it in some variables. Now, I would like to store the data of those variables from matlab gui.
I have tried to use assignin, but this function only save the last data(a scalar), but not data changing with time.
Please let me know are there any function that allow me to store the data according to time.
Thank you.

回答 (1 件)

Abhinaya Kennedy
Abhinaya Kennedy 2024 年 9 月 24 日
  • Using guidata: This function allows you to store and retrieve data associated with a GUI. You can update the data at each time step and store it in the handles structure.
  • Using setappdata and getappdata: These functions allow you to store and retrieve application-defined data. This can be useful for storing data that changes over time.
  • Saving to a MAT-file: You can periodically save your data to a MAT-file, which can then be loaded later. This is useful for long-term storage and retrieval.
You can refer to this link https://www.mathworks.com/help/matlab/ref/guidata.html for more iinfo on the functions mentioned.

カテゴリ

Help Center および File ExchangeWorkspace Variables and MAT-Files についてさらに検索

タグ

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by