From: Catalin Eberhardt on
Hi everyone,

I know I once found a way to have both strings and numbers into a single matrix, for example

A = ['a' 'b' 'c'; 1 2 3]

...but I can't recall the "trick" that I used to do it. Obviously, if you try to define A like above, Matlab gets confused: while it doesn't give an explicit error (at least in R2010a), it then returns this:

A =

abc


Can anyone help? Many thanks in advance!
From: Sean on
"Catalin Eberhardt" <longtalker(a)gmail.com> wrote in message <hru7dp$8ik$1(a)fred.mathworks.com>...
> Hi everyone,
>
> I know I once found a way to have both strings and numbers into a single matrix, for example
>
> A = ['a' 'b' 'c'; 1 2 3]
>
> ..but I can't recall the "trick" that I used to do it. Obviously, if you try to define A like above, Matlab gets confused: while it doesn't give an explicit error (at least in R2010a), it then returns this:
>
> A =
>
> abc
> 
>
> Can anyone help? Many thanks in advance!

a hint:
>> doc cell