![Page 1: MATLAB App and Toolbox Development - mathworks.com€¦ · App Development. 5. 6 Model-view-controller pattern. 7 Object system technologies § Classes – Properties – Methods](https://reader035.vdocuments.net/reader035/viewer/2022062605/5fd241232f753c32711f8edb/html5/thumbnails/1.jpg)
1
![Page 2: MATLAB App and Toolbox Development - mathworks.com€¦ · App Development. 5. 6 Model-view-controller pattern. 7 Object system technologies § Classes – Properties – Methods](https://reader035.vdocuments.net/reader035/viewer/2022062605/5fd241232f753c32711f8edb/html5/thumbnails/2.jpg)
2© 2016 The MathWorks, Inc.
MATLAB App and Toolbox Development
이정수
Applications EngineerMathWorks
![Page 3: MATLAB App and Toolbox Development - mathworks.com€¦ · App Development. 5. 6 Model-view-controller pattern. 7 Object system technologies § Classes – Properties – Methods](https://reader035.vdocuments.net/reader035/viewer/2022062605/5fd241232f753c32711f8edb/html5/thumbnails/3.jpg)
3
Master class outline
§ App development– Motivation– Design patterns– Object system technologies– Demonstrations
§ Toolbox packaging– Motivation– Artifacts– Structure– Developer workflows– User workflows
![Page 4: MATLAB App and Toolbox Development - mathworks.com€¦ · App Development. 5. 6 Model-view-controller pattern. 7 Object system technologies § Classes – Properties – Methods](https://reader035.vdocuments.net/reader035/viewer/2022062605/5fd241232f753c32711f8edb/html5/thumbnails/4.jpg)
4
App Development
![Page 5: MATLAB App and Toolbox Development - mathworks.com€¦ · App Development. 5. 6 Model-view-controller pattern. 7 Object system technologies § Classes – Properties – Methods](https://reader035.vdocuments.net/reader035/viewer/2022062605/5fd241232f753c32711f8edb/html5/thumbnails/5.jpg)
5
![Page 6: MATLAB App and Toolbox Development - mathworks.com€¦ · App Development. 5. 6 Model-view-controller pattern. 7 Object system technologies § Classes – Properties – Methods](https://reader035.vdocuments.net/reader035/viewer/2022062605/5fd241232f753c32711f8edb/html5/thumbnails/6.jpg)
6
Model-view-controller pattern
![Page 7: MATLAB App and Toolbox Development - mathworks.com€¦ · App Development. 5. 6 Model-view-controller pattern. 7 Object system technologies § Classes – Properties – Methods](https://reader035.vdocuments.net/reader035/viewer/2022062605/5fd241232f753c32711f8edb/html5/thumbnails/7.jpg)
7
Object system technologies
§ Classes– Properties– Methods– Events– Attributes
§ Listeners§ handle (and its derivatives)§ The reference counter
![Page 8: MATLAB App and Toolbox Development - mathworks.com€¦ · App Development. 5. 6 Model-view-controller pattern. 7 Object system technologies § Classes – Properties – Methods](https://reader035.vdocuments.net/reader035/viewer/2022062605/5fd241232f753c32711f8edb/html5/thumbnails/8.jpg)
8
Model
Event notificationProperty access, method call
HeartRateHistogramView StripChartView
MapViewPlayer
![Page 9: MATLAB App and Toolbox Development - mathworks.com€¦ · App Development. 5. 6 Model-view-controller pattern. 7 Object system technologies § Classes – Properties – Methods](https://reader035.vdocuments.net/reader035/viewer/2022062605/5fd241232f753c32711f8edb/html5/thumbnails/9.jpg)
9
Demonstrations:
ModelSimple view
Graphical view
![Page 10: MATLAB App and Toolbox Development - mathworks.com€¦ · App Development. 5. 6 Model-view-controller pattern. 7 Object system technologies § Classes – Properties – Methods](https://reader035.vdocuments.net/reader035/viewer/2022062605/5fd241232f753c32711f8edb/html5/thumbnails/10.jpg)
10
More class types
§ A chart is an object that provides a specific type of visualization via a convenient API
§ Charts be used in apps, reports, and for ad hoc visualization§ A view binds data to a chart
– When the data changes, the chart updates– The data often lives in a model – as in model-view-controller – class
§ Patterns– Chart: composite– View: observer
![Page 11: MATLAB App and Toolbox Development - mathworks.com€¦ · App Development. 5. 6 Model-view-controller pattern. 7 Object system technologies § Classes – Properties – Methods](https://reader035.vdocuments.net/reader035/viewer/2022062605/5fd241232f753c32711f8edb/html5/thumbnails/11.jpg)
11
Demonstration:
Charts
![Page 12: MATLAB App and Toolbox Development - mathworks.com€¦ · App Development. 5. 6 Model-view-controller pattern. 7 Object system technologies § Classes – Properties – Methods](https://reader035.vdocuments.net/reader035/viewer/2022062605/5fd241232f753c32711f8edb/html5/thumbnails/12.jpg)
12
Toolbox packaging
![Page 13: MATLAB App and Toolbox Development - mathworks.com€¦ · App Development. 5. 6 Model-view-controller pattern. 7 Object system technologies § Classes – Properties – Methods](https://reader035.vdocuments.net/reader035/viewer/2022062605/5fd241232f753c32711f8edb/html5/thumbnails/13.jpg)
13
![Page 14: MATLAB App and Toolbox Development - mathworks.com€¦ · App Development. 5. 6 Model-view-controller pattern. 7 Object system technologies § Classes – Properties – Methods](https://reader035.vdocuments.net/reader035/viewer/2022062605/5fd241232f753c32711f8edb/html5/thumbnails/14.jpg)
14
MATLAB Toolbox files (.mltbx)
§ Available from R2014b§ Packs multiple files into a single file to be distributed§ Includes metadata and product dependencies§ Single step to install (or update)§ Configures MATLAB path§ Registers apps and documentation
www.mathworks.com/help/matlab/matlab_prog/create-and-share-custom-matlab-toolboxes.html
![Page 15: MATLAB App and Toolbox Development - mathworks.com€¦ · App Development. 5. 6 Model-view-controller pattern. 7 Object system technologies § Classes – Properties – Methods](https://reader035.vdocuments.net/reader035/viewer/2022062605/5fd241232f753c32711f8edb/html5/thumbnails/15.jpg)
15
Toolbox artifacts
§ Code§ Apps§ Examples§ Documentation§ Tests§ Utilities
![Page 16: MATLAB App and Toolbox Development - mathworks.com€¦ · App Development. 5. 6 Model-view-controller pattern. 7 Object system technologies § Classes – Properties – Methods](https://reader035.vdocuments.net/reader035/viewer/2022062605/5fd241232f753c32711f8edb/html5/thumbnails/16.jpg)
16
Suggested toolbox structure
/my.prj
/util.m
/tbx/my
/fcn.m/Class.m
/mydoc/howto.html/example.m
/apps/app.m
/releases
/tests
![Page 17: MATLAB App and Toolbox Development - mathworks.com€¦ · App Development. 5. 6 Model-view-controller pattern. 7 Object system technologies § Classes – Properties – Methods](https://reader035.vdocuments.net/reader035/viewer/2022062605/5fd241232f753c32711f8edb/html5/thumbnails/17.jpg)
17
Suggested toolbox structure
/my.prj/util.m/tbx/releases/tests
where tbx is what is released, and contains…
/tbx/my/Contents.m/fcn.m/Class.m
/mydoc/howto.html/example.m
/apps/app.m
![Page 18: MATLAB App and Toolbox Development - mathworks.com€¦ · App Development. 5. 6 Model-view-controller pattern. 7 Object system technologies § Classes – Properties – Methods](https://reader035.vdocuments.net/reader035/viewer/2022062605/5fd241232f753c32711f8edb/html5/thumbnails/18.jpg)
18
Developer workflows
§ Creating§ Packaging§ Testing§ Bundling apps§ Managing dependencies§ Distributing
![Page 19: MATLAB App and Toolbox Development - mathworks.com€¦ · App Development. 5. 6 Model-view-controller pattern. 7 Object system technologies § Classes – Properties – Methods](https://reader035.vdocuments.net/reader035/viewer/2022062605/5fd241232f753c32711f8edb/html5/thumbnails/19.jpg)
19
Demonstration:
Toolbox packaging
![Page 20: MATLAB App and Toolbox Development - mathworks.com€¦ · App Development. 5. 6 Model-view-controller pattern. 7 Object system technologies § Classes – Properties – Methods](https://reader035.vdocuments.net/reader035/viewer/2022062605/5fd241232f753c32711f8edb/html5/thumbnails/20.jpg)
20
User workflows
§ Viewing what is installed§ Installing§ Uninstalling§ Updating§ Launching apps§ Viewing documentation§ Writing code
![Page 21: MATLAB App and Toolbox Development - mathworks.com€¦ · App Development. 5. 6 Model-view-controller pattern. 7 Object system technologies § Classes – Properties – Methods](https://reader035.vdocuments.net/reader035/viewer/2022062605/5fd241232f753c32711f8edb/html5/thumbnails/21.jpg)
21
Demonstration:
Toolbox usage
![Page 22: MATLAB App and Toolbox Development - mathworks.com€¦ · App Development. 5. 6 Model-view-controller pattern. 7 Object system technologies § Classes – Properties – Methods](https://reader035.vdocuments.net/reader035/viewer/2022062605/5fd241232f753c32711f8edb/html5/thumbnails/22.jpg)
22
Learn more
§ Slides and some demos will be available§ Demo station: “Building MATLAB Apps to Visualize Complex Data”§ Training
– Building interactive applications in MATLAB– Object-oriented programming in MATLAB
§ Workshops by MathWorks Consulting– App development– Testing
![Page 23: MATLAB App and Toolbox Development - mathworks.com€¦ · App Development. 5. 6 Model-view-controller pattern. 7 Object system technologies § Classes – Properties – Methods](https://reader035.vdocuments.net/reader035/viewer/2022062605/5fd241232f753c32711f8edb/html5/thumbnails/23.jpg)
23
Thank you.
Questions?