For Programmers: Free Programming Magazines  


Home > Archive > Matlab > April 2005 > how to read this data into a matrix with "textscan"









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author how to read this data into a matrix with "textscan"
yzriver

2005-04-27, 9:01 pm

Anyone can tell me how to read this data into a matrix with
"textscan".
The data file is:
G00P0.s2p -1.410010e+000 1.546046e+001 2.958509e-011
G01P0.s2p -1.405291e+000 1.543455e+001 3.045325e-011
G02P0.s2p -1.417232e+000 1.557427e+001 2.712963e-011
G03P0.s2p -1.417232e+000 1.557427e+001 2.712963e-011

after reading, the matrix can be:
0.0 -1.410010e+000 1.546046e+001 2.958509e-011
1.0 -1.405291e+000 1.543455e+001 3.045325e-011
2.0 -1.417232e+000 1.557427e+001 2.712963e-011
3.0 -1.417232e+000 1.557427e+001 2.712963e-011

Thanks!
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com