You can use the num2cell
function to convert a double to a cell array. For example:
main.m49 chars3 lines
If you want to convert an array of doubles to a cell array, you can use the num2cell
function with the array as an argument.
main.m64 chars3 lines
If you get an error message saying "Conversion to cell from double is not possible", make sure that you are not trying to assign the result to a numeric variable. In other words, make sure that you are using the correct type of variable to store the result of the conversion.
gistlibby LogSnag