Solved


Generate Golomb's sequence
Generate Golomb's sequence up to the given number. If n=4, then seq = [1, 2, 2, 3, 3, 4, 4, 4] If n=6, then s...

2 months ago

Solved


generate the matrix
given a value n (say 4) - generate the matrix like below y= [0 1 2 3 4; -1 0 1 2 ...

2 months ago

Solved


Wythoff Sequence
Find the lower Wythoff sequence up to n. For more information, <https://oeis.org/A000201>

2 months ago

Solved


Adjoint matrix
given a matrix a, find the adjoint matrix of a.

2 months ago

Solved


cofactor matrix
given a matrix, find its cofactor matrix <https://en.wikipedia.org/wiki/Minor_(linear_algebra)#Inverse_of_a_matrix>

2 months ago

Solved


Rotate a matrix without using rot90
rotate the input square matrix by certain degrees (e.g. 270 or 450 etc.) without using rot90 or flip function. its an extension...

2 months ago

Solved


AES MixColumns() Transformation
Given a 16x2 input character hexadecimal array representing the AES state, execute the AES algorithm MixColumns() transformation...

2 months ago

Solved


another bullseye
create matrix like below -- for x=2, y=[1 1 1 1 1; 1 2 2 2 1; 1 2 3...

2 months ago

Solved


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for.

2 months ago

Solved


Gray code
Given a decimal number, convert it to its corresponding Gray code (see https://en.wikipedia.org/wiki/Gray_code). 8 -- 1100...

2 months ago

Solved


Check if a number belongs in the fibonacci squence
Test if integer i is a number in the fibonacci sequence. Return true if it is.

2 months ago

Solved


Check if number is a square number
Test if integer i is a square number. Return logical true if it is.

2 months ago

Solved


Check if integer is a prime number
Check if integer i is a prime number. Returns logical true '1' if it is.

2 months ago

Solved


Quadratic equation
given three inputs (a, b, c) for the equation a*x^2+b*x+c=0; return 1 if the roots are complex (non zero imaginary), and 0 if th...

2 months ago

Solved


Convert Fahrenheit to Kelvin
Convert the value f in Fahrenheit to Kelvin

2 months ago

Solved


find subscripts from linear index
a matrix and the linear index of an element is given as input. find the subscripts of that element. if linear index=3 , outp...

2 months ago

Solved


Determine whether a given point is inside or outside a polygon
A closed polygon may be described by an N x 2 array of nodes, where the last node and the first node are the same. Each row of t...

2 months ago

Solved


Reepeating numbers in array
Repeating numbers in array In = [1 0 0 0 2 0 0 0 3 0 0 0 0 0 5 0 0 0 0]. Out = [1 1 1 1 2 2 2 2 3 3 3 3 3 3 5 5 5 5 5].

2 months ago

Solved


Calculate the area of a circle
Given a circle of diameter x calculate its area

2 months ago

Solved


Fun with permutations
There are factorial(N) permutations of the numbers from 1 to N. For each of these permutations, we can find the set of indexes j...

2 months ago

Solved


remove numbers from a string
check the given string for any numbers.in case one is found,remove it.but the two portions should be separated. if more than one...

2 months ago

Solved


Double Factorial
Return double factorial n(n-2)...(5)(3)(1), n>0, odd n!! = n(n-2)...(6)(4)(2), n>0, even 1 ...

2 months ago

Solved


Repeat elements of a vector
Repeat each elements of a given vector according to their values. * x=[1,2,1,3] * y=[1,2,2,1,3,3,3]

2 months ago

Solved


Combinations using Stirling numbers of the second kind
Output the number of ways to distribute n labelled balls among k identical boxes (some of which might be empty). Example: ...

2 months ago

Solved


factorial
calculate x!

2 months ago

Solved


Square
square root of x

2 months ago

Solved


Takuzu row
Takuzu row is one row in a logic puzzle of a rectangular grid. The rules are as follows: (1) The row is filled with 1s and 0s...

2 months ago

Solved


All flights lead to Idaho Falls
Using spherical trigonometry and great circle paths, determine the distance (in kilometers) and the initial flight heading (from...

2 months ago

Load more