Skip to content

Commit 34fa2e0

Browse files
author
Enric Sala
committed
Minor improvements to the examples in the README
1 parent e103d87 commit 34fa2e0

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ p2 = Point('weather') ...
7373
.time(datetime('now', 'TimeZone', 'local'));
7474
7575
% Create an array of points
76-
array = [p1, p2, etc];
76+
array = [p3, p4, etc];
7777
7878
% Save all the points
7979
influxdb.writer() ...
80-
.append(p1, p2) ...
80+
.append(p1, p2, etc) ...
8181
.append(array) ...
8282
.execute();
8383
```
@@ -86,20 +86,20 @@ It is possible to save *large* amounts of samples using the `Series` builder:
8686

8787
```matlab
8888
% Create a series with many points
89-
series = Series('weather') ...
89+
series1 = Series('weather') ...
9090
.tags('city', 'stockholm', 'country', 'sweden') ...
91-
.fields('temperature', [10.5, 11.2, 9.7]) ...
92-
.time(datetime('now', 'TimeZone', 'local') - [0, 1, 2]);
91+
.fields('temperature', [10.5; 11.2; 9.7]) ...
92+
.time(datetime('now', 'TimeZone', 'local') - [0; 1; 2] / 24);
9393
9494
% Create a series from an existing timetable
9595
ttable = timetable(time, variables, etc);
96-
series = Series('weather') ...
96+
series2 = Series('weather') ...
9797
.tags('city', 'helsinki', 'country', 'finland') ...
9898
.import(ttable);
9999
100100
% Save the series
101101
influxdb.writer() ...
102-
.append(series, etc) ...
102+
.append(series1, series2) ...
103103
.execute();
104104
```
105105

0 commit comments

Comments
 (0)