Let's say I have a circle at (0,0) with radius = 1; I want the computer to generate a equally spaced vector from 0 degree to 90 degree based on a direction specified at 0 degree. For example, if the direction is [0,1], it will be a counterclockwise rotation such as [0,10,20,30…80,90]; if the direction is [0,-1], it will be a clockwise rotation such as [0,350,340,330…100,90].

The direction, initial and final angular positions are all inputs, and I want the computer to self determine which way the rotation will occur.

I am new to Matlab, thanks a lot for the help!

## Best Answer