specify size output
Mostrar comentarios más antiguos
Hi I (with lots of help) have written the following code:
In = dlmread(FileName);
[unDates,trash,IDX] = unique(In(:,1:5),'rows');
Out = [unDates zeros(size(unDates,1),1)];
for d = 1:size(unDates,1)
Out(d,end) = mean(In(IDX == d,end));
end
dlmwrite ('IonOut.csv',Out,'-append','precision','%0.10g','delimiter',',');
end
It does its job of finding unique values column 5 of a csv file that looks like this:
2002,1,1 ,13, 731217, 1119.566899634552 , 8.11440000
however the output file leaves off the last column, I cant see what I have done wrong, can anyone help?
Patrick
Respuesta aceptada
Más respuestas (1)
Patrick
el 16 de Mzo. de 2011
0 votos
Categorías
Más información sobre Whos 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!