Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski 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
Joined
Aug 29, 2007
Messages
1
Location
GB
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.
 
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

Back
Top