PDA

View Full Version : Matlab char array help please?


Snk_majin
Oct31-04, 06:25 AM
Hi,

I hope you can help, i'm trying to create an array of characters in matlab:

It has to be 100 x 5000 in size, i'm not to sure where to start. I've looked at some web resources and it some mention bringing in java strings?

I'd ideally not like to use java as i want to learn the core workings of matlab.

Is there a way this can be done? I'd really appriciate any helped offered..

Thanks for your time
Snk_majin

ivas
Nov1-04, 09:28 AM
Hello, i hope i can help You.

You can start from inputing "help char" command in You Matlab Command window. You will see several exaples on creating the char array.

blue_raver22
Nov3-04, 03:36 AM
u make it just like a numerical matrix... but instead of using brackets --> [], u use the curly brackets --> {}

ex.

>> x = {'I' 'am' 'using';'a' 'character' 'array'}

x =

'I' 'am' 'using'
'a' 'character' 'array'

>>

get it? just do it with the number of rows and columns you need... btw, the " ; " allows the data to be put onto the next row... refer to the above.. hope that helped...