Plotly.cpp 0.1.0
A C++ plotting library for expressive, interactive, real-time & streaming data visualization
Loading...
Searching...
No Matches
linspace.cpp File Reference
#include "linspace.hpp"
#include <vector>
Include dependency graph for linspace.cpp:

Functions

auto linspace (double a, double b, int n) -> std::vector< double >
 Create a linearly spaced vector of values between two endpoints.

Function Documentation

◆ linspace()

auto linspace ( double a,
double b,
int n ) -> std::vector< double >

Create a linearly spaced vector of values between two endpoints.

Parameters
aStart value
bEnd value
nNumber of points to generate
Returns
std::vector<double> Vector containing n linearly spaced values from a to b
Examples
gallery_animate_sin_wave.cpp, gallery_golden_ratio.cpp, gallery_sin_curve.cpp, and gallery_statistical_distributions.cpp.