Showing results for 
Search instead for 
Did you mean: 

read matlab file to STFT spectrogram

Hello everyone!


I would like to know how to read an array of a matlab file so I can do the spectrogram of that signal with the advanced signal processing toolkit.


Thank you very much.

0 Kudos
Message 1 of 4

hi Sawyer


It depends on the file format. What kind of matlab file are you using? What is the file extension? an the file structure (binary or ASCI)? Can you attach an example?


0 Kudos
Message 2 of 4


It´s just an array of data of matlab, .mat


thank you for your answer


p.d: i can´t attach the .mat file, but it´s just a 6000x1 array of data

0 Kudos
Message 3 of 4

since you have a .mat, its just binary. If you want to read that, you are going to have to create a VI to parse out the data. It might be easier to just save the file as ASCII, which is a lot easier to read in LabVIEW.


  1. To save a vector or a matrix X in ASCII format with tab delimiter, enter the following in the command window or m-script file in the MATLAB® environment: >>SAVE filename X      -ascii -double -tabs. This creates a file whose name is filename, and it contains the data X in ASCII format with a tab delimiter.
  2. Import the file into LabVIEW using the Read From Spreadsheet File VI located on the Programming»File I/O palette.


Chris Van Horn
Applications Engineer
0 Kudos
Message 4 of 4