필터 지우기
필터 지우기

Printing a character n times

조회 수: 42 (최근 30일)
Jason
Jason 2020년 6월 10일
답변: madhan ravi 2020년 6월 10일
Is it possible to print a '.' (i.e..a dot) n times without using a loop?
I have a loop that waits for a response and I want the number of dots to be printed indicating what number loop its in
Thanks
Jason

채택된 답변

KSSV
KSSV 2020년 6월 10일
편집: KSSV 2020년 6월 10일
s = repelem('.',1,10) ;
fprintf('%s\n',s)

추가 답변 (1개)

madhan ravi
madhan ravi 2020년 6월 10일
n = 5; % number of times
join(repmat(".",5,1))

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by