ABOUT STRING OUTPUT IN SAME LINE
Show older comments
clear all
clc
for i=1:5
str1=sprintf('QS_%d + ',i);
disp (str1)
end
THIS IS MY CODE I AM GETTING OUTPUT IN THE NEXT NEXT LINE LIKE
QS_1 +
QS_2 +
QS_3 +
QS_4 +
QS_5 +
BUT WANT OUT PUT IN SAME LINE LIKE QS_1 + QS_2 + QS_3 + QS_4 + QS_5 +
Accepted Answer
More Answers (1)
Walter Roberson
on 21 Jul 2015
for i=1:5
fprintf('QS_%d + ',i);
end
fprintf('\n');
Categories
Find more on Entering Commands in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!