I have the following code:
fonts = dir(‘fonts’)
strcmp(‘BELL.TTF’,fonts.name)
where dir(‘fonts’) returns a 33×1 struct where each entry has name (string), date, and a few other things. I can’t figure out what type fonts.name is (if it’s a cell array or what), and my end goal is to be able to use strcmp to compare across all of the names.
fonts.nameis 33 separate character arrays. You want to combine these into a cell array so that you can use it withstrcmp.In code:
tfis a logical array with 1 whereverfonts.nameis equal to'BELL.TTF'