Use for loop to display the following numbers in sequence separated by “,”
1, 2, 3, 4, 5, 6, 7, 8, 9, 10
this is what I have so far but I can't figure out how to get rid of the coma after the 10.
A1=' ';for i=1:1:10 A2=[num2str(i),',']; A1=[A1,A2]; enddisp(A1)
Best Answer