Hello, I have the following lines of code:
fid = fopen('singleatom.txt','r'); %read as a single cell
C = textscan(fid,'%s'); fclose(fid); C = C{1,1}(1:5)
which produces the following output:
C = 'Eu3+' '1' '10.06037350' '-4.673610300' '-1.834337367'
Could anyone explain to me how you would go about converting the cell array into a format where the data could be utilised, as this does not appear to be possible in its current form. The data represents:
C(1) = atom typeC(2) = atom numberC(3) = x-coordinateC(4) = y-coordinateC(5) = z-coordinate
So, for instance, how would I convert the data so that I could proceed to plot the atom's position on a scatter plot and label it with the identifiers?
Any assistance would be greatly appreciated.
Kind regards,
Tom
Best Answer