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

18 views (last 30 days)
How can I create vector for values in the range -π < θ < π ?

Accepted Answer

Image Analyst
Image Analyst on 27 Nov 2016
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);

More Answers (1)

Stephen23
Stephen23 on 27 Nov 2016
Edited: Stephen23 on 27 Nov 2016
  3 Comments

Sign in to comment.

Tags

Community Treasure Hunt

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

Start Hunting!