How can I get matlab to execute one or both parts of a code depending on whether a variable exists?
Afficher commentaires plus anciens
I want to define a cell of data from a particular file if that particular file exists and a different cell of data if a different file exists. Sometimes both files will exist and sometimes only one. I then want to perform some operations on the cell(s) that exist, but a different operation on each existing file. I.e. I might have cell1 and cell2 or I might just have cell1 or just cell2. There will be a set of operations to perform if cell1 exists and a different set of operations to perform if cell2 exists, and if both exist I want to perform both sets of operations. What sort of structure would be best to do this?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Structures dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!