How to read values from an ASCII file with several pairs of numbers within brackets?
古いコメントを表示
Hi, would anyone have an idea about the simplest way to read values from an ASCII file written in the form below please? For the sample below, I would like to end up with a vector with 8 complex numbers, with values: [0.500839233-0.00349639822i; 0.500839233-0.00349639822i; 0.500839174-0.00349647552i; ...]. I have tried to first read the values using some variations of fscanf(fid,'(%f,%f)'), but it has not worked so far. Thanks.
(0.500839233,-0.00349639822) (0.500839233,-0.00349639822)
(0.500839174,-0.00349647552) (0.500839114,-0.00349660218)
(0.500839114,-0.00349676609) (0.500839174,-0.0034969002)
(0.500839233,-0.00349701941) (0.500839233,-0.00349714234)
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Text Files についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!