Advanced Octave A68 — Data preparation and publishing
Advanced GNU Octave with GX-TXT · Module 12
Now we turn the A67 protocol into two Datasets. The data are artificially generated: to call them observations or measures in the project means here simulated samples, not experimental results.
Objectives and prerequisites
They serve A67 and the batch publication of A14. The test uses GX-TXT dev112-P011-bis and GNU Octave 9.4.0. Import genera_misure.m, register it and run it in the Runner. The octave_project_response_a and octave_project_response_b IDs are created-only: to repeat, use a new Session or change both IDs even in dependent lessons.
Generate and publish
rng(2026,'twister') initializes the generator. For each condition the program calculates 1-exp(-k*t) and adds standard deviation gaussian noise 0.02. A use k = 0.5 s⁻¹, B uses k = 0.8 s⁻¹; both have 11 times from 0 to 5 s.
Dataset contains time_s in seconds, with time role, and response dimensionless. The origin declares synthetic nature, seed, parameter and standard deviation. publish_series_batch publishes the two series as an atomic operation according to the agreement of the API.
In the test the first answers are about −0.001726 and −0.018029, and the last 0.913431 and 0,957048. A slightly negative initial value is possible because Gaussian noise is added to the ideal zero value: it is not cut out or hidden. The receipt shows two published Datasets and 11 points each.
Exercise
- What sizes and units are published?
- Why can the first value be negative?
- What allows you to reproduce the seed, along with the code and the environment?
Worked solution
- Time in seconds and dimensionless response.
- Synthetic noise can have negative sign even when the ideal answer is zero.
- The random sequence of the test in the compatible environment; method and parameters should also be kept.
Other steps of this project
- Advanced Octave A75 — Dynamical systems in phase space
- Advanced Octave A81 — Geography of the waves and a 3D surface
- Advanced Octave A82 — Age, sex and demographic inequalities
- Advanced Octave A83 — All-cause mortality, certified COVID deaths and surveillance
- Advanced Octave A84 — A reproducible public account
- Advanced Octave A73 — Optimization landscapes and 3D trajectories