result
클래스: matlab.engine.FutureResult
네임스페이스: matlab.engine
Python에서 비동기식으로 호출된 MATLAB 함수의 결과
구문
ret = FutureResult.result(timeout=None)
입력 인수
timeout
— 제한 시간 값(단위: 초)
None
(디폴트 값) | Python float
함수 호출 결과를 대기하기 위한 제한 시간 값(단위: 초)으로, Python 데이터형 float
로 지정됩니다. timeout = None
이면 FutureResult.result
함수는 함수 호출이 끝날 때까지 기다린 다음, 결과를 반환합니다.
출력 인수
ret
— 비동기식 함수 호출의 결과
Python 객체
비동기식 함수 호출의 결과로, Python 객체로 반환됩니다. 이는 MATLAB 함수 호출의 실제 출력 인수입니다.
예제
비동기식 호출에서 MATLAB 출력 인수 가져오기
Python에서 MATLAB sqrt
함수를 호출합니다. background
를 True
로 설정하고, FutureResult
객체에서 제곱근을 얻습니다.
import matlab.engine eng = matlab.engine.start_matlab() future = eng.sqrt(4.0,background=True) ret = future.result() print(ret)
2.0
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)