RATPOW

버전 1.0.0.0 (2.26 KB) 작성자: Wathanyoo Khaisongkram
RATPOW Raises a real number to a rational power.
다운로드 수: 671
업데이트 날짜: 2004/11/1

라이선스 보기

OUT = RATPOW(X,Y) computes X to the power of Y elementwisely. Both X and Y must be real and must have the same dimensions unless one is a scalar. Elements of Y should be rational numbers. If there is an irrational number, it will be approximated by a rational number with a pair of small numerator and denominator by means of function RAT. Element of Y is also reduced to the lowest terms fraction. The funtion return a single real solution OUT.

Specifically, suppose ABS(Y)=A./B where A and B are coprime (their corresponding elements have no common factor), then RATPOW performs X.^(1/B) first, and then raises it to the power of A. Hence, if an element of B is an odd number, the corresponding element of X must be non-negative. Otherwise, the error message is produced. Moreover, if an element of Y is negative, the function returns the inverse of the corresponding element of X^(A/B).

인용 양식

Wathanyoo Khaisongkram (2024). RATPOW (https://www.mathworks.com/matlabcentral/fileexchange/6146-ratpow), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R13
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Numbers and Precision에 대해 자세히 알아보기
도움

줌: RATPOW

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0