Checking existence of Simulink model with full pathname
9 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Monika Jaskolka
il 10 Giu 2020
Modificato: madhan ravi
il 10 Giu 2020
Why is it that I can use the exist command to check if a model exists, but when I provide the fullpath name, it is only considered a file?
>> exist('test.mdl');
ans =
4
>> exist('C:\temp\test.mdl');
ans =
2
0 Commenti
Risposta accettata
madhan ravi
il 10 Giu 2020
https://www.mathworks.com/help/matlab/ref/exist.html#mw_0724f29e-7978-4e62-8c9d-4425e1c7a338 - you may be looking for isfile(...)
2 Commenti
madhan ravi
il 10 Giu 2020
Modificato: madhan ravi
il 10 Giu 2020
Or you could use cd(...) and then use exist(...)
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Naming Conventions in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!