Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

index exceeds matrix dimesion error

Status
Not open for further replies.

oluwajobi

Computer
Aug 29, 2007
1
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.
 
Replies continue below

Recommended for you

I copy and pasted your code into my version of matlab and it worked fine (no index exceeds matrix error). I am using version 7.0.

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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor