Info

This question is closed. Reopen it to edit or answer.

I keep getting a matrix dimensions must agree error message in line 28, does anyone know what is wrong?

1 view (last 30 days)

Answers (1)

Image Analyst
Image Analyst on 1 Dec 2019
Use strcmpi() or strcmp() to compare strings, not ==.
if (wordInputFile{i, 2} == yearRange(j)) && strcmpi(wordInputFile{i, 1}, word)
strcmpi(wordInputFile{i, 1}, word} will return either true or false depending on whether those words match or not.

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!