Extracting data from .mat file
現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
古いコメントを表示
0 投票
Hi,
I need to extract illumination and time data from a .mat file and calculate corresponding power output for a particular solar panel. Can anyone help me regarding this ?
Thanks in advance.
1 件のコメント
Rik
2021 年 5 月 18 日
If you have trouble with Matlab basics you may consider doing the Onramp tutorial (which is provided for free by Mathworks).
doc load
採用された回答
Star Strider
2021 年 5 月 18 日
Use the load function, and specifically, Load List of Variables into Structure Array. The structure array then allows selection of specific variables within the file to import into the workspace.
11 件のコメント
Raisa Sharmin
2021 年 5 月 18 日
I have 27232842x1 double data in one column of the file, having problem with the sorting and doing the calculations
Star Strider
2021 年 5 月 18 日
I am not certain what the problem is, what the data are, or what you want to do with the data in the file.
I can provide more help with a few more details.
Raisa Sharmin
2021 年 5 月 18 日
It is like, I got 3years of solar illumination data of a particular solar panel, now I need to calculate the output power. I need to seperate the data monthwise, and calculate the output power for a single day.
Star Strider
2021 年 5 月 18 日
It would appear that you have a datetime variable with the data as a dependent variable.
There are several ways to deal with it, including converting it to a timetable and using the retime function, using the groupsummary function, and other approaches. Read the documentation for those and related functions (linked to in the documentation pages for those and other related functions). Start with the Timetables documentation and go from there.
Raisa Sharmin
2021 年 5 月 18 日
thanks for the suggestion, I am going through it.. would comment again if I need more help.
Star Strider
2021 年 5 月 18 日
As always, my pleasure!
You should be able to do it without much effort, if you already have a reasonably robust knowledge of MATLAB.
I will help as I can.
Raisa Sharmin
2021 年 5 月 18 日
I do not have that much knowledge actually, I am just a new learner.. Thank you :)
Raisa Sharmin
2021 年 5 月 19 日
編集済み: Raisa Sharmin
2021 年 5 月 19 日
Hi, im using the table2timetable function, my matlab version is R2020_b, and was following this video, but I cannot name the loaded file like this.
https://se.mathworks.com/videos/managing-time-stamped-tabular-data-with-timetable-120888.html
Star Strider
2021 年 5 月 19 日
I do not understand thke problem you are having.
Raisa Sharmin
2021 年 5 月 19 日
Hi, I am sharing the screenshot

Star Strider
2021 年 5 月 19 日
As I mentioned earlier, load ‘Alison_intensity_data.mat’ in to a structure. You can then determine what is has in it, and extract it.
D = load('Alison_intensity_data.mat');
time = D.time; % Try Something Like This To Extract It
Apparently, ‘time’ is not already a table, so perhaps using the timetable function instead will be appropriate.
.
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で MATLAB についてさらに検索
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
