help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how insert char in Cell Array


From: Mike Miller
Subject: Re: how insert char in Cell Array
Date: Sun, 26 Aug 2018 10:48:03 -0700
User-agent: Mutt/1.10.1 (2018-07-13)

On Sat, Aug 25, 2018 at 20:57:30 -0500, LucaLuca wrote:
> hi,
> 
> i want to convert cell in matrix
> 
> i do an example:
> 
> c = {"1", "2", "3"; "x", "y", "z"; "4", "5", "6"};
> 
> cell2mat(c)
> 
> ans =
> 
> 123
> xyz
> 456
> 
> But it's wrong..
> 
> i want get matrix with :
>  1 2 3
>  x y z
>  4 5 6

Do you really want a 3-by-5 matrix?

Do you want A(2,2) to be a space and A(2,5) to be 'z'?

If so, then you might want to use the strjoin function to insert spaces.

-- 
mike

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]