Problem 2971. square a vector-Given the variable x as your input, square it and put the result in y.
function y = (x)squared
y = x; end
Solution Stats
Problem Comments
-
1 Comment
Matthew Eicholtz
on 7 Feb 2015
I suggest looking at more Cody examples to understand the structure of the problem statement, function definition, and test suite.
Solution Comments
Show commentsProblem Recent Solvers103
Suggested Problems
-
353 Solvers
-
Create a Multiplication table matrix...
398 Solvers
-
Generate a random matrix A of (1,-1)
278 Solvers
-
Find Factrorial without using built-in function
130 Solvers
-
Element by element multiplication of two vectors
358 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!