MATLAB: Strtok doesn’t work on the matlab version

strtok

Hello,
I'm a begium student. My function consist of select the month of September. That's why i ask to delete the lignes when the 7 characters of my vector date is different of 9 (because the date format is 2016-09-..) It works on my university computer but i have another version of matlab on mine (i get it with matwork), can you explain why the "strtok" doesn't work here.
Thank you very much

Best Answer

Your elements are string arrays, not character vectors. To access the 7th character of j, you need to use j{1}(7)
There are some routines that used to return cell arrays of character vectors by default but now return string arrays instead by default. If you are not expecting it then that can lead to problems.
Related Question