How to get numerical values of a text type cell ?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi,
I am trying to read the contents of a .txt file, which is the frequency response data I got from other simulation software. The following shows the format of the data, which has 'Frequency' and 'Real/Imaginary' part of the frequency response.
![Capture.JPG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/206189/Capture.jpeg)
I tried using 'readtable()' to load the data into MATLAB, which works. However, the loaded data is in 'Cell' format, and I am not able to get the actual value of the data, please see following.
![Capture.JPG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/206190/Capture.jpeg)
My question is (1) how can I get the actual values ? (2) Is there any better way to do the job than 'readtable()' ? Thanks for help!
0 commentaires
Réponse acceptée
Walter Roberson
le 27 Fév 2019
T = readtable(FileName, 'Delimiter', ' ,');
6 commentaires
Walter Roberson
le 28 Fév 2019
T = readtable(filename, 'Delimiter', '\t,');
You did indeed have a tab.
Plus de réponses (1)
Voir également
Catégories
En savoir plus sur Convert Image Type dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!