Character in cell array, read and write
Mostrar comentarios más antiguos
Hello all,
I have a data in cell something like this:
1 BCS ACK/NACK 2054 0.00000 10.0000 Inside
[Note: actually I have 100 lines like above]
Now what I want to do is break this into different colum and save to excel sheet so that I can creat some graphs. Can anyone suggest how to, pls?
BR MJ
2 comentarios
Azzi Abdelmalek
el 17 de Sept. de 2012
what is the size of your cell array
MJ
el 26 de Sept. de 2012
Respuesta aceptada
Más respuestas (3)
MJ
el 18 de Sept. de 2012
0 votos
2 comentarios
Azzi Abdelmalek
el 18 de Sept. de 2012
Is there a problem with the code?
Azzi Abdelmalek
el 18 de Sept. de 2012
Editada: Azzi Abdelmalek
el 26 de Sept. de 2012
In case you have more then one blanck
A={'1 BCS ACK/NACK 2054 0.00000 10.0000';'1 BCS AK/NCK 2054 0.00 10.0000'}
res=cellfun(@(x) regexp(x,' ','split'),A,'uni',false)
out=[]
for k=1:numel(res)
q=res{k};
q(cellfun(@(x) length(x)==0,q))=[]
out=[out;q]
end
xlswrite('file.xls',out)
MJ
el 28 de Sept. de 2012
2 comentarios
Azzi Abdelmalek
el 28 de Sept. de 2012
Editada: Azzi Abdelmalek
el 28 de Sept. de 2012
format your code
can you post samples of your data?
MJ
el 1 de Oct. de 2012
MJ
el 1 de Oct. de 2012
1 comentario
Azzi Abdelmalek
el 1 de Oct. de 2012
your data are well imported, what do you need to do
Categorías
Más información sobre Language Support 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!