Problem


Modified Upper Matrix Mock
Given a vector v=[1 3 6 9 11], turn it into a matrix 'ramp' like so: m=[1 3 6 9 11; 0 3 6 9 11; 0 0 6 9 11; 0 0 0 9 11; 0 0 0...

mehr als 7 Jahre vor | 1 | 49 Lösungsvorschläge

Problem


Circular Shift Me
Given a vector v=[1 3 6 9 11], circular shift them while iterating m=[1 3 6 9 11; 11 1 3 6 9; 9 11 1 3 6; 6 9 11 1 3; 3 6 9 1...

mehr als 7 Jahre vor | 0 | 57 Lösungsvorschläge

Gelöst


Strangest ways to get 0
Propose your non-trivial way to get 0. Look mine's, and try to do your best!

mehr als 7 Jahre vor

Gelöst


Solving a quadratic equation
Given a, b ​​and c, Return the solution of the following quadratic equation: a*x^2 + b*x + c = 0.

mehr als 7 Jahre vor

Gelöst


Polynomial division
Divide a polynomial u by polynomial v and return the quotients only. Example: u = x^4+3*x^3+5*x+3 v = x^2+1 Answer: ...

mehr als 7 Jahre vor

Gelöst


Additive persistence
Inspired by Problem 2008 created by Ziko. In mathematics, the persistence of a number is the *number of times* one must apply...

mehr als 7 Jahre vor

Gelöst


Accessing elements on the diagonal
Access the diagonal elements of a matrix without 'diag' function

mehr als 7 Jahre vor

Gelöst


square root
Find the square root (y) of an input (x).

mehr als 7 Jahre vor

Gelöst


Multiple if statements
Write an if-statement that subtracts 5 from outputValue if amplitudeResponse is greater than 10. Write a second if-statement tha...

mehr als 7 Jahre vor

Gelöst


Food safety
Assign safeTemperature with 1 if foodTemperature is less than 40 or greater than 165.

mehr als 7 Jahre vor

Gelöst


Check bounds
Assign inRange with 1 if userWeight is greater than 100 and less than or equal to 200.

mehr als 7 Jahre vor

Gelöst


Genetic markers test
Assign testResult with 1 if either geneticMarkerA is 1 or geneticMarkerB is 1. If geneticMarkerA and geneticMarkerB are both 1, ...

mehr als 7 Jahre vor

Gelöst


convert?
* Given a string containing a number followed by pounds or kgs, for example: * 'Billy lost 22 pounds in four weeks.' * 'Maria ...

mehr als 7 Jahre vor

Gelöst


Vectorizing, too easy or too hard?
Please insert a . before any ^, * or / in the string. That's it!!

mehr als 7 Jahre vor

Gelöst


deconvolution
* Suppose there is a vector v like [1 0 0 -1], representing polynomial coefficients. * In this example, the polynimial is 1*x^3...

mehr als 7 Jahre vor

Problem


Refresh your system of equations
Given square matrix, and solution vector, find the values of the variables Example: xyz = [1 -1 2; 0 2 5; 4 0 -3]; //x-y+2...

mehr als 7 Jahre vor | 4 | 50 Lösungsvorschläge

Gelöst


System of equations
Find a solution to a system of equations represented by a |n| by |n+1| matrix. For instance, [ 2 0 4; => 2*x = 4 ...

mehr als 7 Jahre vor

Gelöst


Distance walked 3D
suppose you go from x-y-z coordinates [3,4,2] to [0,0,2] to [0,1,2] to [1,1,2], to [1,1,20] then you walked 25 units of distance...

mehr als 7 Jahre vor

Gelöst


Snakes on a plane
Given the dimensions of a 2-d plane, create a matrix where a "snake" of ones occupies the plane from top left to bottom right. ...

mehr als 7 Jahre vor

Gelöst


Sorting
Assume that x is an n-by-2 matrix. The aim is to return the first column of x, but sorted according to the second column. Exa...

mehr als 7 Jahre vor

Problem


N-plicate me
Modified version of duplicate and triplicate me. Repeat elements of input vector with given input n Ex: input = [1 2 3 4 5...

mehr als 7 Jahre vor | 4 | 68 Lösungsvorschläge

Gelöst


Who knows the last digit of pi?
There is only one man who knows the last digit of pi, who is that man? Give the name of that man, who, by popular believe, can ...

mehr als 7 Jahre vor

Gelöst


Function definition: Double down.
* Complete the DoubleDown function to return twice the initialValue.

mehr als 7 Jahre vor

Gelöst


Computing wind chill
On a windy day, a temperature of 15 degrees may feel colder, perhaps 7 degrees. The formula below calculates the "wind chill," i...

mehr als 7 Jahre vor

Gelöst


Duplicate each element of a vector.
for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice. Ex...

mehr als 7 Jahre vor

Gelöst


Declaring a string
* Assign streetAddress with the string 1313 Mockingbird Lane.

mehr als 7 Jahre vor

Problem


Implement zero-based indexing for Matrices
Given an input vector and position (which is zero based) output the value Example: x = [1 2; 4 5] pos = [0 1] value = 5 ...

mehr als 7 Jahre vor | 9 | 77 Lösungsvorschläge

Gelöst


Construct an array
* Construct an row array named observedValues with elements sensorReading1, sensorReading2, and sensorReading3.

mehr als 7 Jahre vor

Problem


Rotate matrix by -90 degrees
Rotate a Matrix by -90 degrees Example: X = 1 2 3 4 5 6 7 8 9 output = 7 4 ...

mehr als 7 Jahre vor | 9 | 176 Lösungsvorschläge

Gelöst


Rotate a Matrix by 90 degrees
Rotate a Matrix by 90 degrees Example: If the input is: X = 1 2 3 4 5 6 7 8 9 ...

mehr als 7 Jahre vor

Mehr laden