how to write a function to return -1 if string is not found in matlab??
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Mohammed
am 5 Sep. 2016
Kommentiert: Image Analyst
am 6 Sep. 2016
I wrote a function that finds a 3 digit number of a filename? i need to write an if statement to return -1 if this part of the file cannot be extracted ? how do i do that?
Thanks :)
2 Kommentare
the cyclist
am 5 Sep. 2016
There are several possible ways to do this. Can you post your code, or at least the part of it that attempts the extraction?
Image Analyst
am 6 Sep. 2016
ANY 3 digit number whatsoever, or only a specific 3 digit number that you specify in the input argument list along with the filename?
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!