jeudi 7 janvier 2021

MATLAB: IF Statement based on a String's name

I have 60 different strings (Book01, Book02, ..., Book60). I want to do a certain procedure only for Book045 until Book58.

How do I write an if statement, so that the procedure is only performed for any String Book045 until Book58? For example:

Book48
    If (name of string = Book045 to Book58)
      My Procedure
    else
      Nothing
    end

Thanks.

Aucun commentaire:

Enregistrer un commentaire