MATLAB: How to add a cell to a matrix

cellMATLABmatrix

So I have a few vectors which describe different star characteristics and I also have some IDs for the stars which look like 2272-500-1. I have to extract the IDs for stars that lie in a certain magnitude range. The thing is that all these IDs cannot form a double so I end up with a cell. My question is if there's any way to combine the cell with the doubles and form matrix?

Best Answer

No. You cannot store a cell array inside a numeric matrix.
I suggest that you use num2cell to transform the numeric data into a cell array that you can then vertcat or horzcat with the id cells
Or consider using a table