0

I have a matlab script with some attributes and an App designer script.

I would like to know if it is possible to use or to retrieve an attribute of the matlab script with the appdesigner script.

My goal is to compare an attribute's value with 0 and launch the script or not ?

Thanks for helping !

Lucas
  • 247
  • 3
  • 13
  • *"An app designed script"*? This question is currently too broad, give us an example to work with! – Wolfie May 09 '19 at 10:37
  • @Wolfie i have a matlab script (.m file) which has an attribute `n_component = numel( component_list );` this attribute is equal to 0 only if the user chose a wrong file with the app. So in the script of the app (.mlapp) i would like to have `if n_component == 0 i do something`but i don't know if can call it like this – Lucas May 09 '19 at 11:25
  • If the script has already run then the `n_component` variable will exist in your base workspace. You may have to use `evalin('base', 'n_component')` but this seems like really bad practise. You should turn your script into a function which the app calls, then you can return either `0` or the correct value. – Wolfie May 09 '19 at 11:41

0 Answers0