MCPcopy Create free account
hub / github.com/alandefreitas/matplotplusplus / meshgrid

Function meshgrid

source/matplot/util/common.cpp:486–497  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

484 }
485
486 std::pair<vector_2d, vector_2d> meshgrid(const vector_1d &x,
487 const vector_1d &y) {
488 vector_2d X(y.size(), std::vector<double>(x.size(), 0));
489 vector_2d Y(y.size(), std::vector<double>(x.size(), 0));
490 for (size_t i = 0; i < y.size(); ++i) {
491 for (size_t j = 0; j < x.size(); ++j) {
492 X[i][j] = x[j];
493 Y[i][j] = y[i];
494 }
495 }
496 return std::make_pair(X, Y);
497 }
498
499 std::pair<vector_2d, vector_2d> meshgrid(const vector_1d &x_and_y) {
500 return meshgrid(x_and_y, x_and_y);

Callers 15

fimplicitMethod · 0.85
fcontourMethod · 0.85
quiver3Method · 0.85
fmeshMethod · 0.85
fsurfMethod · 0.85
initialize_x_yMethod · 0.85
peaksFunction · 0.85
contourcFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected