index exceeds matrix dimesion error
index exceeds matrix dimesion error
(OP)
Hi there,
while trying to resolve a problem using cellstr() function, i decided to test the example given in matlab manual, but instead got this error message, can anyone just help out on the cause and ways of resolving it
S=['abc ';'defg';'hi ']
S =
abc
defg
hi
>> c = cellstr(S)
??? Index exceeds matrix dimensions.
while trying to resolve a problem using cellstr() function, i decided to test the example given in matlab manual, but instead got this error message, can anyone just help out on the cause and ways of resolving it
S=['abc ';'defg';'hi ']
S =
abc
defg
hi
>> c = cellstr(S)
??? Index exceeds matrix dimensions.





RE: index exceeds matrix dimesion error
however... instead of using the cellstr function you could just write:
D={'abc ';'defg';'hi '}
note the different brackets... that will give you the same exact result as the code you typed