- In order to convert “timeseries” to “timetable”: ML answers link: timeseries to timetable
- In order to convert “timetable” to “table”: ML answers link: timetable to table
- Dynamically providing column names to a MATLAB table: ML answers link: Dynamically changing column names
Heat flow sensor data transfer from simscape to workspace
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Delika Weragoda
il 30 Ott 2022
Commentato: Delika Weragoda
il 4 Nov 2022
Hi,
I'm trying to transfer the data from a heat flow rate sensor in simscape to workspace (time against heat flow data). I've tried all the options that I know of using logging data from the scope and using 'To Workspace' blocks. But everytime I get data in this format val(:,:,1) = , val(:,:,2) = and so on. I've tried structured with time, structure, array and timeseries.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1173858/image.png)
I did see that timeseries will no longer be available the timetabled format will be used. I tried converting the timeseries to timetabled format, and the time data is tabulated with the units, is it possible to just tabulate the time data without the units?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1173868/image.png)
Any help is much appreciated.
Thanks
0 Commenti
Risposta accettata
Suvansh Arora
il 2 Nov 2022
In order to convert “timeseries” to “timetable” you can follow the approach mentioned below:
% Generating Data
ts1 = timeseries(rand(5,1),[])
% Generating Time
ts2 = timeseries([0, 0.009, 0.097, 0.297, 0.498],[])
% Final Timeseries
ts = [ts2 ts1]
% Timeseries to TimeTable conversion
TT = timeseries2timetable(ts)
% TimeTable to table conversion
T = timetable2table(TT)
colName = {'Time', 'Data'};
T = table(T.Data, T.Data_1, 'VariableNames', colName)
Please refer to the following Documentation for more information:
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Two-Phase Fluid Library in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!