Solved


Number Puzzle - 027

1 year ago

Solved


Number Puzzle - 111

1 year ago

Solved


Number Puzzle - 108

1 year ago

Solved


Basic matlab numeric and string manipulations
If entered input (n) is _numeric_ , compute its *log to the base (n+2)* , if it is a _lower case_ alphabet, *convert it to i...

1 year ago

Solved


Counting Squares
An algorithm starts with a single square and on each of its next iterations adds new squares all around the outside as shown bel...

1 year ago

Solved


String revert
Revert all words in a sting x for example, if x = 'this is a sentence' then y should be 'sentence a is this'

1 year ago

Solved


Implement Euler's formula for calculating polyhedron edges
Your function will take as input the number of faces f and number of vertices v of a polyhedron. It will output the number of ed...

1 year ago

Solved


Median filter over three values
Implement 1-D median filter over input vector x as described: Moving window size is 3 Output is middle/central value in moving...

1 year ago

Solved


Fill a zeros matrix
The aim is to fill an array of all zeros given a numerical value and the index of row and columns for this value. 3 Inputs: ...

1 year ago

Solved


Draw 'B'
Draw a x-by-x matrix 'B' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 0 1 0 0 0 1 ...

1 year ago

Solved


Draw 'J'
Given n as input, generate a n-by-n matrix 'J' using 0 and 1 . Example: n=5 ans= [0 0 0 0 1 0 0 0 0 1 0 0 ...

1 year ago

Solved


Définir une fonction creneau
Definr une fonction "creneau" qui prend en entrée un vecteur et renvoie la valeur 1 pour chaque élément positif du vecteur et...

1 year ago

Solved


String vowel manipulation
Given a string, find all the vowels and shift them to the end of the string in the same order as they are found.

1 year ago

Solved


Convert row and column subscripts to linear indices
Convert 2D row and column subscripts to linear indices WITHOUT sub2ind Example: row = [1 2 3 1]; col = [2 2 2 3]; sz = [3 3]...

1 year ago

Solved


Calculate the volume of a cone
Calculate the volume of a cone given an array containing one column of radii and one column of the height of the cone. * Reme...

1 year ago

Solved


Matrix convolution
A certain convolution step involves an elementwise multipication between two 3x3 matrices and taking the resulting sum of the el...

1 year ago

Solved


Lancer de dés
Ecrire une fonction qui imite le lancer d'un dé, i-e qui renvoie de façon aléatoire un entier entre 1 et 6. Attention cette fon...

1 year ago

Solved


Expand a term
Given a term, as a string, expand it. e. g. f = '2(x + y)';

1 year ago

Solved


Find the complement of a number in binary
Input x is a decimal number and output y is the complement of binary representation of x. For example, x = 10 has the binary ...

1 year ago

Solved


Number Puzzle - 075

1 year ago

Solved


Extract leading non-zero digit
<http://en.wikipedia.org/wiki/Benford%27s_law Benford's Law> states that the distribution of leading digits is not random. This...

1 year ago

Solved


Weighted average
Given two lists of numbers, determine the weighted average as follows Example [1 2 3] and [10 15 20] should result in 33.3...

1 year ago

Solved


given 3 sides, find area of this triangle
1:3 -> 0; 3:5 -> 6

1 year ago

Solved


Find the elements of a matrix according to a defined property.
From A = [5,2,3] and B = [1,2,3,4,5,6,7,8,9,10] produce a vector C where : C(1) is the sum of the first A(1) elements of B, ...

1 year ago

Solved


First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero i...

1 year ago

Solved


vectorization in N
For a given integer n (n>1), compute the sum f (i) (1 <= i <= n) where f (i) = 1 if n is odd and 2 otherwise.

1 year ago

Solved


Say type of roots in quadratic equation
Given the coefficients of a quadratic equation, write a function that gives the output y='RealDifferent' if the roots are real a...

1 year ago

Solved


Ratio between sums of prime and non-prime numbers
Write a function that calculates the ratio between the sum of the prime numbers lower or equal than x, and the sum of the non-pr...

1 year ago

Solved


Alternating 1´s and 0´s in a matrix
Given an odd number n, write a function that creates a matrix y with dimension nxn alternating 1's and 0's, and starting with 1 ...

1 year ago

Load more