Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

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 ]
Curious

Posts: 1,986
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$1@newscl01ah.mathworks.com>...
> 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]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.