MATLAB Programming Fundamentals - MathWorks

(やまだぃちぅ) #1

and by de Moivre's theorem we get


i1/n= cos 2 k+1/2π +isin 2 k+1/2π 1/n= cos
2 k+1/2π
n
+isin
2 k+1/2π
n

.


Homework


Use live scripts as the basis for assignments. Give students the live script used in the
lecture and have them complete exercises that test their understanding of the material.


Use the techniques described above to complete the following exercises:


Exercise 1: Write MATLAB code to calculate the 3 cube roots of i.


% Put your code here


Exercise 2: Write MATLAB code to calculate the 5 fifth roots of -1.


% Put your code here


Exercise 3: Describe the mathematical approach you would use to calculate the nth roots
of an arbitrary complex number. Include the equations you used in your approach.


(Describe your approach here)


See Also


More About



  • “Create Live Scripts in the Live Editor” on page 19-7

  • MATLAB Live Script Gallery


See Also
Free download pdf