ABSTRACT

Since all rows in an array must have the same number of entries, the strings must all be the same length, so you must pad shorter strings with spaces. Cell arrays avoid this problem (see Section 8.1). Use strcmp and strcmpi to compare strings for equality. strcmp(’A’,’a’) is false, while strcmpi(’A’,’a’) is true because the latter ignores case.