Solved


Magnitude of a vector (★★★)
Given a vector x with values [ x1, x2, x3, ..., xn ], compute the magnitude (or length) of the vector which is given by href ...

2 months ago

Solved


Create a vector of the first n odd numbers (★)
If n = 10, your program should return a vector y, where y = [1 3 5 7 9 11 13 15 17 19].

2 months ago

Solved


Vector raised to a power, element-wise (★)
Given a vector A and a number x, raise each element of the vector to the power of x. Thus, if A = [2 5 7 1] and x = 0.5, then ...

2 months ago

Solved


Function 1 (★)
Compute the value of <<https://i.imgur.com/AxKWLmE.gif>> for any given positive x.

2 months ago

Solved


Convert matrix to 3D array of triangular matrices
Given a 2D numeric array x in which each column represents the vectorized form of an upper triangular matrix, return a 3D array ...

2 months ago

Solved


Must be in the front row...
You are given a matrix followed by a single number. Your object is to write a script that will shift the matrix around so that ...

2 months ago

Solved


Magnet and Iron
(Inspired from <http://www.mathworks.com/matlabcentral/cody/problems/112 Problem 112: Remove the air bubbles>) Iron (atomic n...

2 months ago

Solved


Swap the first and last columns (★★)
(copy of Prob 19) Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becom...

2 months ago

Solved


Easy Sequences 39: Perfect Squares in Pascal's Triangle
Consider the 2nd, 3rd and 4th diagonals of the Pascal's Triangle, shown highlighted below: ...

2 months ago

Solved


Number of paths on a 3d grid
This problem is inspired by <https://www.mathworks.com/matlabcentral/cody/problems/1483-number-of-paths-on-a-grid>, which you mi...

2 months ago

Solved


Number of paths on a grid
Consider a grid formed by n vertices vertically down, and m vertices horizontally right. Your starting point is at the top lef...

2 months ago

Solved


Newton’s First Law – Net Force in Equilibrium
At a manufacturing plant operated by Reliance Industries in Jamnagar, a heavy equipment box rests on the factory floor. Even th...

2 months ago

Solved


Newton’s Second Law – Gravitational Force on a Falling Object
During a relief mission organized by the Indian Air Force, supply packages are dropped from aircraft to remote flood-affected ar...

2 months ago

Solved


Newton’s Second Law – Acceleration of Connected Objects
Engineers at Boston Dynamics are testing two robots connected by a rope on a frictionless surface. Robot A pulls Robot B using ...

2 months ago

Solved


Newton’s Second Law – Force Produced by a Car Engine
Automotive engineers at Tata Motors are testing a new electric car prototype on a straight test track in Pune. The engineers wa...

2 months ago

Solved


Newton’s Third Law – Action and Reaction in Rocket Launch
Scientists at SpaceX are testing a rocket engine before launch from their facility. When the rocket pushes exhaust gases downwa...

2 months ago

Solved


Newton’s Second Law – Normal Force in an Accelerating Elevator
Engineers at Otis Elevator Company are testing a new high-speed elevator installed in the Burj Khalifa. When the elevator accel...

2 months ago

Solved


Newton’s Second Law – Motion on an Inclined Plane
In the mountainous region near Manali, a rescue team is testing a motorized emergency vehicle designed to climb steep slopes. E...

2 months ago

Solved


Newton’s First Law – Force Needed to Start Motion
At Indira Gandhi International Airport, a heavy suitcase is sitting on a stationary conveyor belt. The belt is initially at rest...

2 months ago

Solved


Newton’s Second Law – Acceleration of a Mars Rover
At NASA's robotics laboratory, engineers are preparing a prototype rover for a future mission to Mars. Before sending the rover...

2 months ago

Solved


Newton’s Second Law – Force Required to Accelerate a Rocket Cart
At ISRO's training center, engineering students are testing a small rocket-powered cart on a straight frictionless track. The ca...

2 months ago

Solved


Given a Polyshape_01 (ps) Return its Perimeter, Area, and Centroid.
Return the perimeter (P) of a polyshape object, which is the sum of the lengths of its boundaries. Return the total area (A) of...

2 months ago

Solved


5-year Annedversaries
This is the Bonus Round problem for the 2025 Cody Contest. Attend the watch party on Friday, March 27 to see how 6 champions fro...

2 months ago

Solved


Angular Velocity of a Falling Rod Pivoted at One End (Energy + Rotation)
Engineers at Indian Institute of Technology Bombay are designing a rotating docking arm for a future space station. The arm is m...

2 months ago

Solved


Angular Velocity Required to Create Artificial Gravity
Scientists at NASA and Indian Space Research Organisation are designing a rotating space station ring to simulate Earth-like gra...

2 months ago

Solved


Moment of Inertia Using Parallel Axis Theorem
Engineers at Indian Space Research Organisation are designing a satellite with extendable robotic arms. When the arms extend out...

2 months ago

Solved


Acceleration in a Symmetric Double-Pulley Constraint System
Engineers at Indian Institute of Technology Kanpur are designing a precision counterweight system for high-speed elevators. The ...

2 months ago

Solved


Tension in String for Circular Motion (Advanced Rotational Dynamics)
At the astronaut training facility of Indian Space Research Organisation, astronauts are trained using a rotating centrifuge. Th...

2 months ago

Solved


Angular Velocity of a Falling Rod Pivoted at One End (Energy + Rotation)
Engineers at Indian Institute of Technology Bombay are designing a rotating docking arm for a future space station. The arm is m...

2 months ago

Solved


Motion of a Bead Sliding on a Rotating Rod (Non-Inertial Frame Dynamics)
Scientists at Indian Space Research Organisation are testing artificial gravity inside a rotating space station module. Inside ...

2 months ago

Load more