MATLAB: How to print text on the same line

displayfprintfprint

I want to print a sentence on the same line like
for i=1:100
printf('At %d', i);
end
So matlab must print
At 1
Then on the SAME LINE SAME PLACE it must print At 2. Now all it does is print
At 1
At 2
At 3
At 4
Or
At 1 At 2 At 3 At 4 At 5
I want matlab to overwrite the number.

Best Answer

for i=1:100
fprintf('At %d', i);
pause(0.1)
clc
end