Function to evaluate arguments using pol2cart
Ältere Kommentare anzeigen
Write a function with input arguments to be the magnitude and angle (in degrees) of a complex number and output argument to be the Cartesian form of the same number, i.e. x+yi.
Antworten (2)
Roger Stafford
am 29 Mär. 2014
0 Stimmen
Think about how the real and imaginary parts of any complex number are related to its magnitude and angle, and you will have just about solved your problem. The necessary matlab code is easy to write.
1 Kommentar
Carlos
am 29 Mär. 2014
Marta Salas
am 30 Mär. 2014
Bearbeitet: Marta Salas
am 30 Mär. 2014
As arguments for your function you have to write the name of the variable:
function x = Carlos_Virguez_Ex14(r,angle)
Note: you have to modify the code inside your function to use these variables.
then when you call that function [in the MATLAB's prompt] you assign the values for those variables:
>>Carlos_Virguez_Ex14(5,63)
2 Kommentare
Carlos
am 30 Mär. 2014
Marta Salas
am 30 Mär. 2014
Did you get that error running this script?!
Kategorien
Mehr zu Estimation Filters finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!