문서도움말 센터
이 페이지의 최신 내용은 아직 번역되지 않았습니다. 최신 내용은 영문으로 볼 수 있습니다.
데이터를 읽을 수 있는지 확인
tf = hasdata(ds)
예제
tf = hasdata(ds)는 ds로 지정된 데이터저장소에서 읽을 수 있는 데이터가 있는 경우 논리값 1(true)을 반환합니다. 그렇지 않으면 논리값 0(false)을 반환합니다.
ds
1
true
0
false
모두 축소
샘플 파일 mapredout.mat에서 데이터저장소를 만듭니다. 이 파일은 mapreduce 함수의 출력 파일입니다.
mapredout.mat
mapreduce
ds = datastore('mapredout.mat');
데이터저장소에 사용 가능한 데이터가 있으면 데이터를 읽어 들입니다.
while hasdata(ds) T = read(ds); end
입력 데이터저장소입니다. hasdata 메서드에는 다음과 같은 데이터저장소를 입력값으로 사용할 수 있습니다.
hasdata
MATLAB® 데이터저장소 — MATLAB datastore 함수를 사용하여 생성된 데이터저장소입니다. 예를 들어, ImageDatastore를 사용하여 이미지 모음을 위한 데이터저장소를 생성합니다. 데이터저장소의 전체 목록을 보려면 Select Datastore for File Format or Application 항목을 참조하십시오.
datastore
ImageDatastore
결합된 또는 변환된 데이터저장소 — combine 함수와 transform 함수를 사용하여 생성된 데이터저장소입니다.
combine
transform
사용자 지정 데이터저장소 — 사용자 지정 데이터저장소 프레임워크를 사용하여 생성된 데이터저장소입니다. Develop Custom Datastore 항목을 참조하십시오.
귀하의 시스템에 이 예제의 수정된 버전이 있습니다. 이 버전을 대신 여시겠습니까?
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
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:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office