Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

Problem 170. First N Perfect Squares

Created by @bmtran


Return the first N perfect squares


    input = 4;
    output = [ 1 4 9 16 ];

Problem Group

Solution Statistics

398 correct solutions 130 incorrect solutions
Last solution submitted on Jul 28, 2015

Problem Comments

Solution Comments