retrieve version inside AppDesigner appplication (.mlapp file)
Mostrar comentarios más antiguos
Does anyone know how to retrieve (programmatically) the version inside an .mlapp file?
This property is available on top level of the GUI, in picture below it is 1.02. I'd like to display it in a text label in the app.

Respuestas (1)
Image Analyst
el 27 de Mayo de 2024
Editada: Image Analyst
el 27 de Mayo de 2024
Did you try
s = ver('MATLAB');
releaseYear = s.Release(2:end-1);
releaseVersion = s.Version;
fprintf('You are using MATLAB Release %s, version number %s.\n', releaseYear, releaseVersion);
app.yourTextBox.Value = releaseVersion;
5 comentarios
Han Geerligs
el 27 de Mayo de 2024
Editada: Han Geerligs
el 27 de Mayo de 2024
Image Analyst
el 27 de Mayo de 2024
I don't think there is a version for an .mlapp file. So you're best off just having a file called VersionNumber.txt in your folder and then having a function, like the attached, to read in your version into a variable. This is what I do.
Han Geerligs
el 28 de Mayo de 2024
Image Analyst
el 28 de Mayo de 2024
Editada: Image Analyst
el 28 de Mayo de 2024
You or others might find the attached utility useful. It reads an XML file into a structure, which is more familiar, convenient, and easy to use for most of us.
Han Geerligs
el 29 de Mayo de 2024
Categorías
Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!