フィルターのクリア

How to plot a specific data range in a xlsx-file

11 ビュー (過去 30 日間)
Hendrik Lange
Hendrik Lange 2021 年 6 月 16 日
コメント済み: Hendrik Lange 2021 年 6 月 21 日
Hi guys,
i have a big Excel-table (7200000x5), which consists frequencies of a heatpump over a time period. I want to use the fft to analyse the data. But how am i able plot not the wholw datasheet.( for example, from 1-5000? ) Thanks for your help!

採用された回答

Divija Aleti
Divija Aleti 2021 年 6 月 21 日
Hi Hendrik,
The input array to the function 'fft' can be either a vector or a matrix. Firstly, you can create a table using the data in the excel sheet with the function 'readtable'.
Then, you can choose only those rows and columns for which you want to analyse the data.
For example, let A be the table with the data. To use rows 1 to 5000 and all columns, the syntax is:
Y = fft(A(1:5000,:));
To use rows 2500 to 10000 and columns 2 to 4, the syntax is:
Y = fft(A(2500:10000,2:4));
For additional information on the functions used here, refer to the following links:
Hope this helps!
Regards,
Divija
  1 件のコメント
Hendrik Lange
Hendrik Lange 2021 年 6 月 21 日
Hi Divija,
thank you for you help. it worked out! Now i tried to implement your ideas into my code, but get an error. "Index exceeds the number of array elements (5000)" in line 19. I Attached one Screenshot of my code. Maybe you have an idea, how i am able to fix this. I used a mat.data, but that shouldnt be a Problem right?
Thanks for your help, i really appreciate it!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by