이 번역 페이지는 최신 내용을 담고 있지 않습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.
cdflib.renameAttr
기존 특성 이름 바꾸기
구문
cdflib.renameAttr(cdfId,attrNum,newName)
설명
cdflib.renameAttr(cdfId,attrNum,newName)
은 CDF(Common Data Format) 파일의 특성 이름을 바꿉니다.
cdfId
는 CDF 파일을 식별합니다. attrNum
은 특성을 식별하는 숫자형 값입니다. 특성 번호는 0부터 시작합니다. newName
은 특성에 대입할 이름을 지정하는 문자형 벡터나 string형 스칼라입니다.
예제
CDF를 만듭니다. CDF의 특성을 만든 다음 이 특성의 이름을 바꿉니다. 이 예제를 실행하려면 폴더 쓰기가 가능해야 합니다.
cdfId = cdflib.create("your_file.cdf"); % Create an attribute attrNum = cdflib.createAttr(cdfId,"Purpose","global_scope"); % Check the name of the attribute attrName = cdflib.getAttrName(cdfId,attrNum)
attrName = 'Purpose'
% Rename the attribute cdflib.renameAttr(cdfId,attrNum,"NewPurpose") % Check the new name of the attribute attrName = cdflib.getAttrName(cdfId,attrNum)
attrName = 'NewPurpose'
% Clean up cdflib.delete(cdfId) clear cdfId
참고 문헌
이 함수는 CDF 라이브러리 C API 루틴 CDFrenameAttr
에 대응합니다.
이 함수를 사용하려면 CDF C 인터페이스를 잘 알고 있어야 합니다. CDF 웹 사이트에서 CDF 문서에 액세스할 수 있습니다.