How to call mlapp with input arguments (In the startupfunction) from another m script ?

5 次查看(过去 30 天)
Hello,
I created an mlapp in the app designer and i gave it an input argument. Now I want to start the mlapp in another script. I succeded in this by just writing the name of the script in the editor but i dont know how to include the input argument that is needed for the mlapp to properly function. Is there anyway to do this? When I wrote the name of mlapp in the editor with input argument (For example like this mlapp1(pathToSomething)) it doesnt start and when I stop the editor multiple instances of the app start appearing and i need to shut matlab down to stop it. But when i just write the name of the mlapp without the input, this does not happen. So is there anyway to do this or am I doing something wrong here.

采纳的回答

Saksham Gupta
Saksham Gupta 2022-6-27
As per my understanding, you are unable to pass 'path' as an input argument in your mlapp.
I am using R2022a and I am able to pass a path as an input argument perfectly to my mlapp.
My code is as following:
app1("C:\Users\sakshamg ")
You may please specify the exact path which you are sending and if possible, do share your code so that I can help more.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Develop Apps Using App Designer 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by