Matlab Basics II - squares - MATLAB Cody - MATLAB Central

Problem 2911. Matlab Basics II - squares

Difficulty:Rate

Write a function that takes matrix A, and squares each element in the matrix

example: A = [1 2 3]

output = [1 4 9]

Solution Stats

72.58% Correct | 27.42% Incorrect
Last Solution submitted on Oct 06, 2025

Problem Comments

Solution Comments

Show comments
MATLAB EXPO 2025 Registration is Now Open! November 12 – 13, 2025
Registration is now open for MathWorks annual virtual event MATLAB EXPO 2025...
0

Problem Recent Solvers463

Suggested Problems

More from this Author28

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!