Why Does MATLAB Only Read 10,000 Data Points from My Spreadsheet?

  • Context: MATLAB 
  • Thread starter Thread starter Beer-monster
  • Start date Start date
  • Tags Tags
    Matlab
Click For Summary
SUMMARY

The discussion centers on the limitations of MATLAB's data import functionality, specifically when using the xlsread function to analyze sound data stored in a spreadsheet. The user is attempting to combine multiple sets of 10,000 data points from a CSV file into a single analysis but encounters issues with MATLAB only recognizing 10,000 data points despite having input around 150,000. The problem appears to stem from the data being read as a matrix instead of the required column vector format, which affects the resulting spectrum analysis.

PREREQUISITES
  • Familiarity with MATLAB programming, particularly data import functions.
  • Understanding of CSV file structure and data formatting.
  • Knowledge of signal processing concepts, especially Fourier Transform analysis.
  • Experience with matrix and vector operations in MATLAB.
NEXT STEPS
  • Research the use of MATLAB's readmatrix function for importing data.
  • Learn how to reshape matrices into column vectors in MATLAB.
  • Explore MATLAB's FFT function for analyzing combined datasets.
  • Investigate data preprocessing techniques to ensure proper format before analysis.
USEFUL FOR

This discussion is beneficial for MATLAB users, sound engineers, and data analysts who are working with large datasets and require efficient methods for data import and analysis in MATLAB.

Beer-monster
Messages
285
Reaction score
0
Okay,avoiding a long story, for an experiment I'm having to analyse a long sound file using a storage oscilloscope. Th scope stores about a seconds worth of data as 10,000 datapoints on a csv sheet. The file I want to analyse is around 15 secs long, but I used a computer to split it into consecutive samples and played them one after the other.

Now my problem is I want to combine all the results for each separate run so that I can analyse all the data as if I recorded the file all at once. I modified a MATLAB code used to FT wav files to read spreadsheets using xlsread, and it seems to work for each data set individually, but not for all of them.

I've put all the data on a single spreadsheet and tried different ways to input it into matlab, including specifying the range in the code and direct import using the wizard, but I still don't get a suitable spectrum but rather one large peak and a couple of bumps. The only clue I have is that dispite the fact that I've in put arounf 150 thousand data points, MATLAB tells me there's only 10,000.

I'm sortry this is really hard to explain in text, but does anyone think they can guess where I'm going wrong?

Thanks
 
Physics news on Phys.org
It sounds like MATLAB is only reading one of the fifteen seconds of data.

Can you output the 15 or so sets of 10,000 data points individually? If so you could recombine them in matlab.
 
You mean combine the graphs?

Well I think my issue might be the code reads the spreadsheet as a matrix but requires a column vector. Is there a way to read a matrix and a long column?
 

Similar threads

Replies
2
Views
3K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 6 ·
Replies
6
Views
6K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K