매틀랩 6단원 연습문제풀이 (Additional data types and plot types)
- 최초 등록일
- 2010.06.02
- 최종 저작일
- 2009.11
- 6페이지/
한컴오피스
- 가격 1,500원
![할인쿠폰받기](/images/v4/document/ico_det_coupon.gif)
소개글
책 Essentials of MATLAB Programming
저자 Stephen J. Chapman
출판사 THOMSON
6단원 연습문제 입니다.
2,3,5,6,8,11,20,21,22번만 있으니, 확인하고 가져가세요!
목차
없음
본문내용
6.2
function [mag, theta] = to_polar(c)
disp(`Complex number has form,c=a+bi, a is real part and b is imaginary part.`);
c = input(`Enter Complex number (a+bi) :`);
mag = abs(c);
theta = angle(c);
fprintf(`magnitude = %4.2f\n`,mag );
fprintf(`angle = %7.4f\n`,theta );
>> to_polar
Complex number has form,c=a+bi, a is real part and b is imaginary part.
Enter Complex number (a+bi) :12+5i
magnitude = 13.00
angle = 0.3948
>> to_polar
Complex number has form,c=a+bi, a is real part and b is imaginary part.
Enter Complex number (a+bi) :4+3i
magnitude = 5.00
angle = 0.6435
6.3
function [c] = to_complex(mag,theta)
disp(`Complex number has form,c=a+bi, a is real part and b is imaginary part.`);
mag = input(`Enter magnitude :`);
theta = input(`Enter theta :`);
참고 자료
없음