## Profile

Join date: May 14, 2022 0.285067 # the phase is multiplied by the period period = @period # 1/period is the "instant" for plotting instant = 1 / @period # number of points to produce n_points = @n_points # the t and the x where t = instant, then the period is scaled by the t t = instant * period # all the points are shifted by the phase x = 2 * pi * t - @x_offset y = 2 * pi * t - @y_offset for i = 1:n_points t = instant * period * i x = 2 * pi * t - @x_offset y = 2 * pi * t - @y_offset plot(x, y, 'b.') end legend('Phase', 'Magnitude') end x = @x_offset y = @y_offset t = @period instant = 1 / t for i = 1:100 plot(instant * pi, instant * sin(instant * pi), 'b.') # setting the seed set.seed(42) # generate some random data mu = runif(1, -1, 1) sigma = runif(1, 0, 0.5) x_data = -1:pi/2:1 y_data = sigma * mu + noise(x_data, mu) p_x = linspace(x_data, x_data[end], n_points) p_y = linspace(y_data, y_data[end], n_points) sample_data = plot(p_x, p_y, 'r.') legend('Phase', 'Magnitude') plot_x_axis() # export the sample data save(pk, 'plot_data.dat', '

44926395d7