Effacer les filtres
Effacer les filtres

how to load a function in AppDesigner?

12 vues (au cours des 30 derniers jours)
Medical Imaging
Medical Imaging le 18 Mai 2020
Commenté : Medical Imaging le 28 Juil 2020
I am a beginner to appdesigner and i am trying to design my matlab code to load some data which is
load([PTH '/Data.mat']);
the warning I am receiving is "To avoid conflicts with functions on the path, specify variables to load from file." How can I remove thes warning.
  1 commentaire
Medical Imaging
Medical Imaging le 19 Mai 2020
thank you it helped.

Connectez-vous pour commenter.

Réponse acceptée

TADA le 18 Mai 2020
Seems to me that the warning is warning you against loading data into the workspace without controlling the variable names. Try to use an output variable so that the data is returned as a struct into that variable instead:
data = load([PTH '/Data.mat']);
% and while your at it, also use fullfile
% instead of concating, to make your code
% work on other platforms as well
data = load(fullfile(PTH, 'Data.mat'));
  3 commentaires
TADA le 28 Juil 2020
The problem is either with sFOLDERS or app.
One of them is not what you think it is in the particular workspace where this code is running.
You should debug this and inspect these variables on runtime. Either place a breakpoint in that position, or activate the pause on error option, then run your program and activate this method.
Also, concating the folder names into a cell array like that is meaningless, as placing a comma separated list between square or curly bracers is horizontal concatenation.
% these two lines of code
% give identical output
% but the first one is confusing
% and moreover, Matlab doesn't
% appreciate command chaining much
% so it's also an opening for
% future mishaps
C1 = {sFOLDERS(:).name} % this won't be a column cell array after all
C2 = {sFOLDERS.name}
And last but not least, this is a new issue, so you should probably have opened a new question for that one rather than adding a question on an answered thread which won't attract the attention of the forum problem solvers. And also won't show up in future searches
Medical Imaging
Medical Imaging le 28 Juil 2020
Thank you. it is sbout the initialization of sFOLDERS separately.
I understand it and will post as new question if thread question relevance.
I appreciate.

Connectez-vous pour commenter.

Plus de réponses (0)


En savoir plus sur Develop Apps Using App Designer dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by