how to precise the number of digits in MATLAB?
조회 수: 1 (최근 30일)
이전 댓글 표시
hi guys
I want to save some images in a folder from matlab using imwrite(), and I want to name them by counting, which means each image will be named by two letters and six digits such as (gt000001, gt000002, gt000003, gt000004, ..., gt001457, ... ,gt200000).
could someone help me do that?
댓글 수: 0
채택된 답변
Rik
2018년 12월 5일
You can generate a name like that with the sprintf function:
number=2;
name=sprintf('gt%06d',number);
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!