Risolto


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

circa 10 anni fa

Risolto


Derive Me Crazy
Given a polynomial, output its derivative. Example: input = [1 0 0] % x^2 output = [2 0] % 2x

circa 10 anni fa

Risolto


How to permute given 3d matrix?
A(:,:,1)=[1 3] A(:,:,2)=[2 2] A(:,:,3)=[4 3] Change rows to columns and columns to rows, similar to transpose. Resul...

circa 10 anni fa

Risolto


Create vector as shown in test cases
Create vector as shown in test cases

circa 10 anni fa

Risolto


Odd times 3
Given a input matrix x, multiply all odd values by 3. Even values remain the same. example: x = [1 2 3 4 5;... 6 7...

circa 10 anni fa

Risolto


Non trivial identities - complexification
Return x by complexifying it.

circa 10 anni fa

Risolto


Add the even numbers
Add only the even numbers of x example: x = [1 2 3 4 5] the positive numbers are: 2 4, so their sum is 6

circa 10 anni fa

Risolto


Non trivial identities - identity handle
Return x by handling the identity function.

circa 10 anni fa

Risolto


Area of polygon
Given the vertices in vectors X,Y, return the area of the polygon they define.

circa 10 anni fa

Risolto


How find maximum element of a column in matrix?
How find maximum element of a column in matrix?

circa 10 anni fa

Risolto


Marvel or DC?
Given input vector determine if there's a DC value. If there is, output 'DC', else output 'MARVEL'

circa 10 anni fa

Risolto


Find hen's weight.
If hen weights x kilos on two legs, how much does it weights on one leg? Output the result.

circa 10 anni fa

Risolto


Calculate the hypotenuse of a right triangle without using ^ and sqrt ()
Find out the hypotenuse of right triangle. Say a = 4, b = 3 then c = 5 Please don't use ^ and sqrt() function.

circa 10 anni fa

Risolto


Calculate sin(x) without sin(x)
Calculate y = sin(x) x = 0 -> y= 0 without the use of sin(x) or cos(x)

circa 10 anni fa

Risolto


Avengers Assemble!
Given matrix with so many zeroes, trim those zeroes and output a matrix joining all nnz elements Example: input = [0 0 0 0 0...

circa 10 anni fa

Risolto


Slope of the line passing through the point [x1 y1] and [x2 y2]
Determin the slope of Line passing through the points a=[x1 y1] and b=[x2 y2]

circa 10 anni fa

Risolto


Non trivial identities - multiplication
Return x by multiplying it with a random number.

circa 10 anni fa

Risolto


Non trivial identities - division
Return x after dividing it.

circa 10 anni fa

Risolto


Non trivial identities - multiplication
Return x after multipying it.

circa 10 anni fa

Risolto


Change string to number
Change given string to number. (hint: there is already function) Changing from ['1234'] to [1234] is one of example

circa 10 anni fa

Risolto


jumping astronauts
The surface gravity on the moon is approximately 2 m/s^2. Thats why an funny astronauts feels as light as a feather and jumps fr...

circa 10 anni fa

Risolto


Find the volume of cone
Find the volume of cone, when given radius(r) and height(h).

circa 10 anni fa

Risolto


Add the positive numbers
Add only the positive numbers of x example: x = [-2 -1 0 1 2 3] the positive numbers are: 1 2 3, so their sum is 6

circa 10 anni fa

Risolto


99 bottels of beer...
(don't know the song? -> <https://en.wikipedia.org/wiki/99_Bottles_of_Beer>) Create the count down vector in y

circa 10 anni fa

Risolto


Make 3d matrix from other matrix
A=[1 1;2 2]; B=[2 2;3 3]; C=[0 0;1 3]; Using given three matrix, make 3 dimensional matrix [D] by stacking.

circa 10 anni fa

Risolto


Determine point is located in a circle or not
Using input [x] and [y], determine the points (x,y) is located inside of circle (x^2+y^2=1) if point is located in circle,...

circa 10 anni fa

Risolto


Performance - summation
Given a vector of natural numbers x = [1,2,3,...,N] compute the sum of its elements by not stressing the machine too much...

circa 10 anni fa

Risolto


Geometrical meaning of determinant
Given two vectors x,y, in 2D or three vectors x,y,z in 3D space, compute the area (or volume) of the parallelogram they define. ...

circa 10 anni fa

Risolto


Removing vibration!
There are [y] that vary with [x] but y including small useless vibration. x=1:10 y=[1.71 2.03 3.28 4.05 5.10 6.82 7.69 8.3...

circa 10 anni fa

Risolto


Get all prime factors
List the prime factors for the input number, in decreasing order. List each factor. If the prime factor occurs twice, list it as...

circa 10 anni fa

Carica altro