Extracting X and Y binary data to simple X Y file
Mostrar comentarios más antiguos
I am trying to extraxt X and Y coordinates form a binary file.
I want to generate a text file X and Y cordinates in every itteration.
I tried this code:
delete shape_*.dat;
for i=1:numel(SX)
%sx1 = SX{i};
%sy1 = SY{i};
filename = sprintf('shape_0%d.dat', i);
%dlmwrite(filename,SX{i})
dlmwrite(filename,{SX{i},SY{i}},'Delimiter','\t')
end
Attached how it looks like SX and SY.
So the code generete something like that:
SX{i} SY{i}
Which means it put all the values of SX{i} then all the values of SY{i}.
but i want for example, the first colum of SX{1,1} be with the first colum of SY{1,1} and so one.
And save the file for every i.
2 comentarios
dpb
el 16 de Jul. de 2021
We can do nothing with images -- attach a short section of the input file and then explain clearly what it is you expect.
SX = readArray('sx.afdat');
SY = readArray('sy.afdat');
and those plus your attached results don't seem to have anything at all to do with a 'binary' file -- that would appear to be an ordinary text file...what's up with "binary"?
Tesla
el 16 de Jul. de 2021
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Cell Arrays en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!