title: Matlab -- Conversion to double from cell is not possible
body: <p>Can someone tell me why I am receiving this error -- 
  ??? The following error occurred converting from cell to
  double:
  Error using ==> double
  Conversion to double from cell is not possible.</p>
  
  <p>Error in ==> test at 18
      CX(end+1,:) = temp(1);</p>
  
  <p>Here is the code:</p>
  
  <pre><code>file = fopen('C:\Program Files (x86)\Notepad++\testFile.txt'); % open text file
  
  tline = fgetl(file); % read line by line and remove new line characters
  
  %declare empty arrays
  CX = [];
  CY = [];
  CZ = [];
  
  while ischar(tline) % true if tline is a character array
      temp = textscan(fid,'%*s%f%f%f','Delimiter',',&lt;&gt;'); % loads the values from all rows with the specified format into the variable data
  
      CX(end+1,:) = temp(1);
      CY(end+1,:) = temp(2);
      CZ(end+1,:) = temp(3);
  
      tline = fgetl(file);
  end
  
  fclose(file); % close the file
  
  plot3(CX, CY, CZ) % plot the data and label the axises
  xlabel('x')
  ylabel('y')
  zlabel('z') 
  grid on
  axis square
  </code></pre>