Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part A: Generate a script that displays the magnitude and phase angle in degrees of a complex number. The display to the command window should

image text in transcribed

Part A: Generate a script that displays the magnitude and phase angle in degrees of a complex number. The display to the command window should look like the following: Enter the real part of a complex number: 7 Enter the imaginary part of a complex number: 13 The magnitude and phase of 7+13i is Magnitude =14.7648 Phase angle =118.3008 degrees Part B: The following is a skeleton of some MATLAB code. Modify the MATLAB code below to create a function that calculates the phasor for the sum of two sinusoids represented by phasors. function [A3, phi3 ]= PhasorAdd (A1, phil, A2, phi2) \% Usage [A3, phi3] = PhasorAdd (A1, phi1, A2, phi2) \% Calculates the phasor for the sum of two phasors. ENSC 180/ O H.H.Tsang \% A1, phil = magnitude and phase shift in degrees of lst sine wave (note the 1 st phase is "phi one") \% A2, phi2 = magnitude and phase shift in degrees of 2 nd sine wave \% A3, phi 3 = magnitude and phase shift of sum of sinusoids \% Calculate the phasor sum. \% Find the magnitude of the phasor for the sum. Find the phase angle of the phasor for the sum. Use the function from part (b) to calculate the sum of the following two sinusoids. Add code to obtain the information for the signal and also plot the resulting sinusoid. 6cos(200t+60)+8cos(200t30)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Basics Computer EngineeringInformation Warehouse Basics From Science

Authors: Odiljon Jakbarov ,Anvarkhan Majidov

1st Edition

620675183X, 978-6206751830

More Books

Students also viewed these Databases questions

Question

politeness and modesty, as well as indirectness;

Answered: 1 week ago