Solved


Draw a '3' in a zero matrix!

7 months ago

Solved


Find x rows where the sum of the numbers is the maximum
Find x rows where the sum of the numbers is the maximum. For example: when x is 2 and m is 2 3 5 0 2 3 5 5 6 0 9 4 then y =...

7 months ago

Solved


Draw a '1' in a zero matrix!

7 months ago

Solved


Find the minimum of the column-maximums of a matrix
Given a matrix A, find the maximum value of each column, then return the smallest of those maximum values (ie return the minimum...

7 months ago

Solved


Find Closest Constant
Given a number x, return the value that is closest to x from this list of constants: 0, 1, , e, , (also known as ). For exampl...

7 months ago

Solved


Create an arrow matrix
An arrow matrix is a square matrix that contains ones on the diagonal, the last column, and last row. ...

7 months ago

Solved


Calculate the Distance to Source of Lightning
Lightning discharge heats air rapidly with lightning channels reaching temperatures of up to 50,000 degrees Fahrenheit (which is...

7 months ago

Solved


Let's get back to school, and create multiplication tables
For a given range, create multiplication tables. (start is always < endno) Example start = 17 endno = 19 Then, ...

7 months ago

Solved


Calculate Wind Chill Factor
The NWS Wind Chill Temperature (WCT) index formula for calculating the dangers from winter winds and freezing temperatures: Cal...

7 months ago

Solved


Multiplication
Multiply two numbers in a different manner. The numbers are given to you as vectors x and y. Example x = [ 1 2 0 1 ] ...

7 months ago

Solved


Subtract integers and add doubles
Create a function that subtracts a from b if a and b are integers and adds them if they are floats.

7 months ago

Solved


Simulate full-stop emergency braking scenario.
Emergency braking events demand rapid deceleration to bring the vehicle safely to rest. Given initial vehicle speed and constant...

7 months ago

Solved


Compute optimal regenerative and friction brake torque blending.
Electric and hybrid vehicles combine regenerative braking with traditional friction braking to maximize energy recovery while en...

7 months ago

Solved


Estimate brake disc temperature rise during braking.
During braking, kinetic energy is converted into thermal energy, causing brake discs to heat up. Excessive temperature rise can ...

7 months ago

Solved


Compute wheel slip ratio during braking.
During braking, a difference develops between the vehicle’s forward speed and the rotational speed of its wheels. This differenc...

7 months ago

Solved


Compute optimal front–rear brake force distribution.
Modern braking systems dynamically distribute braking forces between front and rear axles to maintain stability, reduce stopping...

7 months ago

Solved


Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

7 months ago

Solved


Matrix Quadrants
Write a function that takes N as the input, and outputs a matrix whose upper-left (NxN) quadrant contains all ones, the lower-ri...

7 months ago

Solved


Remove NaN ?
input -> matrix (n*m) with at least one element equal to NaN; output -> matrix(p*m), the same matrix where we deleted the enti...

7 months ago

Solved


Reverse the elements of an array
Reverse the order of elements in an array: eg: input X = [ 1 2 3 ; 4 5 6 ; 7 8 9 ] o...

7 months ago

Solved


Flip the main diagonal of a matrix
Given a n x n matrix, M, flip its main diagonal. Example: >> M=magic(5); >> flipDiagonal(M) 9 24 1 ...

7 months ago

Solved


Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, generate an output matrix that consists o...

7 months ago

Solved


subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.

7 months ago

Solved


Estimate dynamic load transfer to front axle during braking.
During braking, load shifts from the rear axle to the front axle. Given mass, deceleration, center of gravity height, and wheelb...

7 months ago

Solved


Estimate brake line pressure required for a given force.
Hydraulic braking systems amplify pedal input to generate braking force. Given braking force and piston area, compute the hydrau...

7 months ago

Solved


Compute the required brake torque at wheel to stop the car
Brake torque defines how effectively braking force translates into wheel deceleration. Given braking force and wheel radius, det...

7 months ago

Solved


Compute braking force using vehicle mass and acceleration.
Compute braking force required to stop a vehicle of mass 'm' and with acceleration 'a' Remember: F = m × a.

7 months ago

Solved


Compute vehicle stopping distance using initial speed and constant deceleration.
Given vehicle speed v (m/s) and constant deceleration a (m/s²), compute stopping distance Remember: d = v² / (2a)

7 months ago

Solved


Determine if Input is Oddish or Evenish (Odd/Even Sum of Digits)
Given a positive integer n, determine whether n is "oddish" or "evenish" - that is, whether the sum of the digits of n is odd or...

7 months ago

Solved


Projector Matrix
Write a function to determine whether or not the matrix is a projector. Projector matrices are defined as P^2 = P.

7 months ago

Load more