Question: ( Roots of negative unity: adapted from LM 3 . 1 - 2 4 ) Let n be a positive integer. Recall that - 1
Roots of negative unity: adapted from LM Let be a positive integer. Recall
that
cdots,
but, if we take the th root, we obtain distinct values
dots,
due to the periodicity of the complex exponentials; think Euler. These are roots of
or th roots of
a Write a function at the end of the live script which, given a positive integer finds all
roots of at once, using ONE statement. Do NOT use a loop.
Note. The input to the function is a positive integer and the output of the function
is the column vector of all th roots of negative unity.
Suggested approach. Begin by writing a script which solves the problem with
First do it using a forloop, eg the main fragment would contain
Then think about how to modify it to handle a general value of Lastly, how to
think about vectorizing the code so that the loop is replaced by a single statement.
b Run the function with and For each print out all of these roots
neatly using either disp or fprintf in tabular form. A loop may be used for this part.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
