Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 C++ 中创建它?这是在matlab中。我在谷歌上搜索过,但我找不到这个。知道这个的人可以帮助我吗?
a = linspace(-3000, 3000, 128)
这是一个从 -3000 到 3000 的向量,包含 128 个元素。
一个粗略的例子:
#include <vector> std::vector<double> v(128); // create new vector with 128 elements for (int i = 0; i < 128; ++i) // init vector with required values v[i] = -3000.0 + 6000.0 * i / 127.0;