MATLAB: Cell to double returns NaN str2double I have a c={7 x 1 cell}, and used c1=str2double(c), but get NaN's any advice please. Best Answer If the contents of the cell are already numeric and the task is to convert from a cell array to a purely numeric array, thenc1 = cell2mat(c); Related SolutionsMATLAB: Assigning an empty numeric value to a cell array >>c = {[]};>>class(c{1})ans = double>>isempty(c{1})ans = 1Or if you really want to be specific:c = {double.empty(0)}; MATLAB: Corr returns NaN read the:doc corrand you'll see it's not what you want. Are you looking for :doc corrcoef %? Related QuestionTransposing the contents of the cellMann Kendall returns NaNCan I convert empty strings to NaNs automatically in a cell arrayFor loop returns NaNRemoving cells containing Inf or NaNs
Best Answer