convert double .mat file to struct with time

Hello all,
I have a mat file containing many variables : example
size(voltage)
ans =
1392070 2
here the current is a matrix (n=1392070 , m=2) ,1392070x2 double , the first colunm represents time values and the second one is the values .
the mat file cFor structure format, use the following kind of structure:
var.time=[TimeValues]
var.signals.values=[DataValues]
var.signals.dimensions=[DimValues]
Please i want an example of code of conversion , form example if we have 10 variables inside the mat file .
Best Regards

3 件のコメント

Walter Roberson
Walter Roberson 2021 年 4 月 26 日
Are you trying to convert into Simulink Signals ?
Or are you trying to build information for a NetCDF or H5 file ?
SOUAG Noureddine
SOUAG Noureddine 2021 年 4 月 26 日
Hello Mr Roberson,
Yes , to use them inside simulink ( from workspace)
Best regards
SOUAG Noureddine
SOUAG Noureddine 2021 年 4 月 26 日
i want to obtain this format ;
for example
struct with fields:
time: [21×1 double]
signals: [1×1 struct]

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

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeWorkspace Variables and MAT Files についてさらに検索

質問済み:

2021 年 4 月 26 日

コメント済み:

2021 年 4 月 26 日

Community Treasure Hunt

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

Start Hunting!

Translated by