how to read NASA AMES FORMAT data

26 visualizzazioni (ultimi 30 giorni)
SChow il 14 Lug 2020
Commentato: Walter Roberson il 16 Lug 2020
I havea data with '.nas' extension (NASA AMES FORMAT). Is there a way to read it. I tried readtable and dlmread. None would work.
Please see the data attached as .zip
an update: see the solution in 'answers'
  4 Commenti
KSSV il 14 Lug 2020
You can read that file using textscan. Read about it.
SChow il 14 Lug 2020
Thanks but sorry, textscan couldnot read it.
Can you show how textscan is able to read this data?

Accedi per commentare.

Risposta accettata

SChow il 14 Lug 2020
Matlab cannot read .nas files, so one needs rename the .nas files to .txt (or similarly suitable extensions), and then read the .txt files using textscan
See below for an example
datacell = textscan(FID, '%f%f%f%f', 'HeaderLines', 53, 'CollectOutput', 1); %%%removing the first 53 lines that are headers
  1 Commento
Walter Roberson
Walter Roberson il 16 Lug 2020
no, when you fopen you can give any file name. fopen does not use the file name to identify the type of the file in any way.

Accedi per commentare.

Più risposte (0)


Scopri di più su Data Import and Analysis in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by