Text comparisons no longer work with arrays in 2022a
2 views (last 30 days)
Show older comments
I currently work with 2018a, but I've been trying to adapt some of my programs to 2022a. I'm noticing that there's been changes to functions that compare strings. Previously, I could use cell arrays as inputs to ismember(), contains(), strfind(), etc. so long as I unpacked the string arrays by including curly brackets. Now that no longer works, despite ismember() and strfind()'s purposes is to find strings within arrays. I've even tried converting the cell arrays to string arrays, but string() is having the same problems.
1 Comment
Matt J
on 4 Jul 2022
Bettina's comment moved here:
I have the same problem with the contains function in version R2022a. I just tried it in version 2019a, there it still works, but in the new version, an error message 'first argument must be text' occurs. What changed in the contains function for the new version?
See Also
Categories
Find more on Characters and Strings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!