print integers 1 to 10 in matlab

To print integers 1 to 10 in MATLAB, you can use a for loop and the disp() function. Here's an example code:

main.m
for i = 1:10
    disp(i);
end
30 chars
4 lines

This code will iterate from 1 to 10 and print each integer on a new line using the disp() function.

related categories

gistlibby LogSnag