How to import matrix to app designer?
156 views (last 30 days)
Prajith Chilummula on 22 Feb 2018
Edited: Prajith Chilummula on 22 Feb 2018
Before 2017b,there was a workaround to pass data from workspace to appdesigner. Please refer this link for the method:
In 2017b,the problem is resolved:
1) If you want to share/load data from outside the app, try the following:
a) You can load data from a MAT file in appdesigner code as shown below (inside a
>> mydata = load('data.mat'); % This will load all the variables in data.mat to
b) If you would like to load your data at the initialization phase of the app, add
the above code in "startupFcn" callback of the app.
c) You can read data from base workspace as shown below.
>> data = evalin('base','varName'); % varName is in MATLAB base workspace
2) If you want to share data among callbacks of the app, you can create additional public/private properties of the app and store data in these proprieties.
Refer to the following documentation page for additional information on this.
3) If you want to pass data from app to other external function or to the base workspace, you can do this as shown below:
>> app = myTestApp; % call app and assign to a variable
>> % Retrieve public properties (x,y) of the app
>> x = app.x;
>> y = app.y;