Tell me more ×
Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. It's 100% free, no registration required.

Display the following number pattern on the screen.

    1   2   3   4
    5   6   7   8
    9   10  11  12
    13  14  15  16
share|improve this question
You should ask this at Stackoverflow. – Pål GD Feb 16 at 13:14
But make sure to improve it prior to that. – Raphael Feb 16 at 14:55

closed as off topic by Stéphane Gimenez, Pål GD, Paresh, vonbrand, Raphael Feb 16 at 14:55

Questions on Computer Science Stack Exchange are expected to relate to computer science within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

1 Answer

Try the following code:

A = (1:16)    
B = reshape(A,4,4)
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.