Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask MATLAB Expert

The phase, θ, of a complex number z, is of course determined as follows knowing its real and imaginary parts:

θ = tan-1 imag(z)/real(z)

(1) Your first task is to create a function as follows to return the phase of the complex number in degrees by copying and completing the function in the text below:

function theta = phase1(z)

% Function to be inserted here

end

You should be able to understand how to implement a function from the exercises you have learned in the labs. To also help in implementing the function you should consider the following points:

_ In MATLAB you will find there are two functions fiatan and atan2. Which one should you use in your function? Use the help command to assist you.

_ What if the user enters a complex number that has a phase of 90o or 90o. How can the function be made to work?

_ Think about how to comment the code of the function such that when someone enters help phase, it will tell them exactly what they need to do. This should be your own original writing.

_ What happens if the input is real? Does the function still work?

_ Think about a set of complex numbers you can use to validate your function.

When you are satisfied your function is working and have commented it appropriately, re-name your _file according to the following specification and then submit the program to both ULearn and Turnitin web sites.

NOTE 1: The name of the submitted file MUST be proceeded with your surname and initial followed by the name of the program. For example, if your surname is "Brown", and your first name is "Peter", you need to name the file as follows:

BROWNP_phase1.m

The first part is your surname and initial followed by a hyphen, and then followed by the original filename (phase1.m). If you also have middle names, ignore them in the file name. If your files do not follow this name specification, as a penalty, 10 percent will be deducted from your final mark.

Please use your university username and password (the same username and password that you use to access your university email and computers in the campus) to login to ULearn. Once you login to ULearn, you will be able to see the links to Programming(EEE1015) - Spring Semester 2010-11 on your My ULearn Homepage. Click this link, and submit your assignment to the folder phase1.

NOTE 2: Also submit your program (named according to NOTE 1) to Turnitin, which can be accessed via the following web site:

MATLAB, Engineering

  • Category:- MATLAB
  • Reference No.:- M9528161

Have any Question?


Related Questions in MATLAB

Discrete optimisation- solve the following two problems

Discrete Optimisation - Solve the following two problems with both exhaustive enumeration and branch and bound - Problem 1 is a mixed integer linear optimisation problem (the problem has both discrete and continuous vari ...

Assignment - matlab programmingusing appropriate matlab

Assignment - MatLab Programming Using appropriate MatLab syntax, write the code required to analyse and display the data as per the problem description. The order of the MatLab Program should be as follows: Variables and ...

Assignmentq1 find the laplace transforms of the following

Assignment Q.1 Find the Laplace transforms of the following functions: (a) t 2 + at + b and (b) sin(2nΠt/T) Q.2 Find f (t) for the following F(s) = α[ f (t)]. (i) 5/(s + 3), (ii) 1/s 2 + 25, (iii) 1/s(s+1) Q.3 Find the L ...

Assignment - matlab programmingusing appropriate matlab

Assignment - MatLab Programming Using appropriate MatLab syntax, write the code required to analyse and display the data as per the problem description. The order of the MatLab Program should be as follows: Variables and ...

Assignment -matlab codes and simulated model in

Assignment - Matlab codes and simulated model in simulink/matlab and truetime. 1. Matlab codes and simulink model for pid controller optimization using particle swarm optimization (PSO) my plant is integer order 1000/(s^ ...

Question a safe prime is a prime number that can be written

Question : A safe prime is a prime number that can be written in the form 2p + 1 where p is also a prime number. Write a MATLAB script file that finds and displays all safe primes between 1 and 1000.

Recitation problems -1 determine the highest real root of

Recitation Problems - 1. Determine the highest real root of f(x) = 2x 3 - 11.7x 2 + 17.7x - 5 using the Newton-Raphson method with at least four iterations. Start with an initial guess of x 0 = 3. 2. Determine the real r ...

Assignmentafter the success of your robo-advice venture you

Assignment After the success of your robo-advice venture you decide to explore alternative sources of profitability for your company. You realize that Australian investors are often forced to chose between expensive acti ...

Question - verify the attached paper with matlab and get

Question - Verify the attached paper with matlab and get all the results in the paper and explain step by step the matlab code. Paper - Improving Massive MIMO Belief Propagation Detector with Deep Neural Network. Attachm ...

Question 1 manipulate spectral imagehyperspectral images

Question 1. Manipulate spectral image Hyperspectral images can be seen as a generalisation of normal colour images such as RGB images. In a normal RGB colour image, there are 3 channels, i.e. channels for red colour, gre ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As