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.
Error in ==> test at 18 CX(end+1,:) = temp(1);
这是代码:
file = fopen( C:Program Files (x86)Notepad++ estFile.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 , ,<> ); % 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