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: how to combine 11x1 cell with 11x1 double to 11x2 cell
Replies: 1   Last Post: Aug 19, 2014 10:14 AM

Advanced Search

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

Posts: 2,359
Registered: 12/6/04
Re: how to combine 11x1 cell with 11x1 double to 11x2 cell
Posted: Aug 19, 2014 10:14 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Wong" wrote in message <lsuctf$obm$>...
> Hi guys
> is there any function that I can use to combine 11x1 cell and 11x1 double together and make it into a 11x2 cell ?
> I would like to display it in uitable.

doc num2cell

I don't have MATLAB installed on this computer, but it seems to me something like the following should work: if A is a 11X1 double array and B is a 11X1 cell array, then:

C = num2cell(A);
B(:,2) = C;

which you should be able to combine as:

B(:,2) = num2cell(A);

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.