File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -170,8 +170,9 @@ time = weather.time('Europe/Amsterdam');
170
170
temperature = weather.field('temperature');
171
171
plot(time, temperature);
172
172
173
- % Convert a series to a timetable
174
- ttable = weather.timetable('Europe/Paris');
173
+ % Convert a series to a table or timetable
174
+ mytable = weather.table();
175
+ mytable = weather.timetable('Europe/Paris');
175
176
```
176
177
177
178
Notice that the ` time() ` and ` timetable() ` methods take an optional timezone argument.
Original file line number Diff line number Diff line change 50
50
values = obj .Values(idx ).value;
51
51
end
52
52
53
+ % Convert to a table
54
+ function result = table(obj )
55
+ vars = {obj .Values .value };
56
+ result = table(vars{: }, ' VariableNames' , obj .fields());
57
+ end
58
+
53
59
% Convert to a timetable, with an optional timezone
54
60
function ttable = timetable(obj , timezone )
55
61
if nargin > 1
You can’t perform that action at this time.
0 commit comments