解決済み


Remove the row average (★★★)
(copy of Prob. 963) Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solut...

20日 前

解決済み


Variance computation (★)
Given a vector x with several values, compute the variance, whose formula is given by: <<https://i.imgur.com/Wg95KBE.gif>> ...

20日 前

解決済み


Vector of digits (★★)
Given a positive integer x, construct a vector y with all the digits of x in the order of appearance in x. Thus, if x = 172...

20日 前

解決済み


Generate n equally spaced "intervals" between -x and x (★)
Given n and x, return a list of numbers (in ascending order) that divides the interval [-x x] into n equal-length intervals. ...

20日 前

解決済み


Create a vector of n alternating ones and zeros (★★)
Given n, your output should be a vector y of numbers such that the first number is 1 and the numbers following it alternate betw...

20日 前

解決済み


Corresponding ASCII code.
Given the number, the output will show the corresponding ASCII code.

20日 前

解決済み


Vector with a repeated entry
Create a row vector of length n, filled with 4's. For example, if n = 3, output = [4 4 4]

20日 前

解決済み


Sum of terms in a series 1 (★★★)
Given x and n, compute the following sum: |x|+|x|^(1/2)+|x|^(1/3)+|x|^(1/4)+|x|^(1/5) ... + |x|^(1/n) where ||x|| indica...

20日 前

解決済み


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 ...

20日 前

解決済み


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].

20日 前

解決済み


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 ...

20日 前

解決済み


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

20日 前

解決済み


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 ...

20日 前

解決済み


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 ...

20日 前

解決済み


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

20日 前

解決済み


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...

24日 前

解決済み


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

約1ヶ月 前

解決済み


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...

約1ヶ月 前

解決済み


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...

約1ヶ月 前

解決済み


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...

約1ヶ月 前

解決済み


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...

約1ヶ月 前

解決済み


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 ...

約1ヶ月 前

解決済み


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...

約1ヶ月 前

解決済み


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...

約1ヶ月 前

解決済み


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...

約1ヶ月 前

解決済み


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...

約1ヶ月 前

解決済み


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...

約1ヶ月 前

解決済み


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...

約1ヶ月 前

解決済み


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...

約1ヶ月 前

解決済み


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...

約1ヶ月 前

さらに読み込む