Search All of the Math Forum:

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

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

 Messages: [ Previous | Next ]
 Curious 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

"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);

Date Subject Author
8/18/14 Wong
8/19/14 Curious