The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Combine string matrix and integer matrix
Replies: 7   Last Post: Aug 25, 2013 9:11 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 9,850
Registered: 6/7/07
Re: Combine string matrix and integer matrix
Posted: Aug 23, 2013 7:43 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 8/23/2013 2:13 PM, Sincloe Brans wrote:
> Hi Saravanan
> It works if I specify the items inside my B matrix as you described
> ('a', 'b',...), however it is not in a matrix format though.
> my B matrix keeps changing so I can only specify it as [B] or {B} while
> concatenation. My output C = [A B] where A is integer matrix and B is
> string matrix, dimensions are assumed to be same.

You _can't_ concatenate different types into the same array.

You _can_ make C a cell array w/ a numeric and a character array in the

Or, you can convert all the numeric values to strings and create a
larger character array--a cell array would probably be more handy.

What is the end result of this desired operation, pray tell? If you
were describe what your actual objective is in the end instead of how to
do what is essentially impossible a better solution may ensue.


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.