How can I create vector for values in the range -π < θ < π ?

 采纳的回答

You can use linspace() to specify the number of elements you want:
margin = 0.0001; % Whatever you want. How close to pi you want to allow.
numElements= 1000; % Whatever you want. How many elements in your vector.
theta = linspace(-pi + margin, pi - margin, numElements);

更多回答(1 个)

3 个评论

I know this way. But I do not want -pi and +pi themselves to be included in the vector.
S = 0.01;
T = S-pi:S:pi-S;

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Logical 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by