How do I import binary file data from a nt-mdt file?

16 views (last 30 days)
I have used fid to identify the file, and fread to read it into a matrix but it spits out an empty matrix. It gave my file an fid=3.
The file is binary data that is in an x-y space, with each (x,y) having a 2 number value(intensity and wavenumber)
  2 Comments
dpb
dpb on 18 Apr 2014
Edited: dpb on 18 Apr 2014
Need more info for sure to have any chance...the fid does indicate success in opening a file, but we need to see the actual code used and know what the actual data file structure is, if any, and the encoding of the data (integer, floating point, single- or double-precision if IEEE FP or some other representation, word length, endianness, etc., etc., etc., ...)
Is a "nt-mdt" some standardized format from some application; I've never heard of it (but that doesn't mean anything other than that I've not worked in whatever arena it is that generated the file)?
ADDENDUM:
OK, a search shows it's a proprietary format but a search with "Matlab" didn't find a lot. Apparently there are a couple of commercial products but nothing really useful like a Matlab script or an actual file description showed up.
Did you search File Exchange just in case?
Viral
Viral on 18 Apr 2014
The code i used was:
fid = fopen('XX.mdt','r+')
it returned fid=3
I'll have to get back to you on the data file structure.
nt-mdt is a file format used specifically by a company that makes AFM and Raman systems, their own software can open it and so can an open source software called n-surf which is no longer maintained and was only in beta and cannot handle it.
It is described as a matlab script file which is why I believe there is some way to get that data out in matlab.
what do you mean by searching File Exchange?
Thanks for your help!

Sign in to comment.

Answers (1)

Star Strider
Star Strider on 18 Apr 2014
Edited: Star Strider on 18 Apr 2014
It’s an atomic-force microscopy file, according to a DuckDuckGo search. The only File Exchange contribution I can find is AFM Image Analysis. I don’t know if it also opens the data files.
  2 Comments
Viral
Viral on 18 Apr 2014
Its from software that handles AFM and Raman Spectroscopy data, it was taken using Raman measurements though so it has spectra data and not AFM data.
A commercial package called cytoSpec describes this file format as a matlab script file but it spits out an empty matrix so it might not be able to read it?
Star Strider
Star Strider on 18 Apr 2014
I did an Internet search and found this CytoSpec page for Save MATLAB. It also tells how to open the CytoSpec file.
It seems that load is the correct way to read the file, since it seems to be formatted as a MATLAB ‘.mat’ file.

Sign in to comment.

Categories

Find more on Data Import and Analysis in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!