Question: 1) Create an m-File (Not function) An engineer had measured impedances of a collection of electrical components and created a text file impedance.txt - based
1) Create an m-File (Not function) An engineer had measured impedances of a collection of electrical components and created a text file impedance.txt - based on the numerical data. You will find that impedance.txt on Canvas. The first column of the file is real part of the impedance and the second column is the imaginary part of the impedance Row number indicates the number of components What you should do Create m-file that (1) will read the impedance.txt and find the row number (You can use 'size' function) (2) compute magnitude and phase (angle) of impedance of individual component (3) Save the result on a variable Impedance_Polar (4) Save the result on a text file Impedance Polar.txt (5) Also have this following message displayed on the screen ("There are ### components in the file impedance.txt. The Conversion of Cartesian format of complex number into Polar is completed and the result is saved on Impedance Polar.txt") (6) Do this with FOR LOOP and WHILE LOOP (in other words, create two script one with for loop and one with while loop)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
