How to call function from m-file in GUI, store data and share it between functions in GUI?

1 回表示 (過去 30 日間)
D B
D B 2016 年 9 月 9 日
回答済み: D B 2016 年 9 月 12 日
Hey,
so I am quite new to Matlab. I am trying to create a GUI with 3 graphs on in. I have some data in excel, I must create a plot, then I have to do a transformation of the data and plot it again on the same graph. I have a function in m.file which does all of it but if I want to call for the function in GUI, it doesn't seem possible. I was trying to use handle and guidata various ways. But I got nothing. If I want to use handle it seems like I can store just one array at the time. But my function returns several arrays (and I obviously need them all), for example:
[A,B,C,D]=myFunction(x,y)
if I call for it like below
a=myFunction(x,y,handle)
I will get some data in a but it is just part of it I reckon.
Could anybody help? Thanks in advance.

回答 (1 件)

D B
D B 2016 年 9 月 12 日
I managed to save all my data in one array, that solves the problem.

カテゴリ

Help Center および File ExchangeMathematics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by