Installing and running matlab app able to load and process .mat file

4 vues (au cours des 30 derniers jours)
Matteo Bellini
Matteo Bellini le 10 Jan 2020
Commenté : MD UDDIN le 12 Août 2022
Good afternoon to everybody. With Matlab compiler (AppDesigner) I have to create a standalone app able to use a given .mat file for plot data.
This .mat file contains structures with cells, neural network models, linear models (from fitlm), tables, double arrays.
I have to plot both the data contained in the double arrays and the data (double arrays) generated after calling the neural network models, as here below e.g. listed.
To import the .mat file I have created a property with "load" from a given path.
When I run the application in AppDesigner, the app works correctly.
When I install the packaged standalone application with the inclusion of the .mat file to load and I run it, the standalone app don't works. I need some help!
Thank you and best regards.
properties (Access = public)
var = load ('*path\file.mat') % Description
end
[...]
n = app.var.net;
t = app.var.table;
x = n(app.var.FirstArray);
y = app.var.SecondArray;
scatter(app.UIAxes,x,y,"black");
  1 commentaire
MD UDDIN
MD UDDIN le 12 Août 2022
I am facing almost similar situation. I have .csv file to be processed and plot the figures. When I run the app in standalone application it can process data only which are in Desktop (Same directory where my app shortcut is located). I want that my app will be able to process any data from any directory (any directory from my pc or from removeable disk /usb). Would you please suggest me how to do that ? @Matteo Bellini@J. Alex Lee

Connectez-vous pour commenter.

Réponses (1)

J. Alex Lee
J. Alex Lee le 12 Jan 2020
If the problem is that the standalone app can't find the file to load in the first place, you need to understand how paths work in deployed apps.
https://blogs.mathworks.com/loren/2008/08/11/path-management-in-deployed-applications/
Or use full paths

Catégories

En savoir plus sur Image Data Workflows dans Help Center et File Exchange

Produits


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by