Solved


Multiply by 9
Multiply by 9, bruh!

10 years ago

Solved


Multiply by 10
Multiply by 10, bruh!

10 years ago

Solved


Values in Array
How many values are in the array

10 years ago

Solved


Replace values out of an interval with the lower or upper values
For a vector or matrix X and an interval [n1,n2], the function replace every element of x inferior to n1 by n1, and every elemen...

10 years ago

Solved


Height of a right-angled triangle
Given numbers a, b and c, find the height of the right angled triangle with sides a and b and hypotenuse c, for the base c. If a...

10 years ago

Solved


Crunch that matrix!
You are given an M x N matrix. Write a script that will compress this matrix into an M x (N/3) matrix, where each of the terms ...

10 years ago

Solved


Isothermal Expansion
Given the initial pressure and volume of an ideal gas, calculate the new volume, given the new pressure. Hint: <https://en.wi...

10 years ago

Solved


Sum two real numbers
It seems easy, but... You cannot use +, -, plus, diff, cumsum, *, prod, times, etc.

10 years ago

Solved


generate number in particular way
A = [1 5 2 7]; MAX = 10; generate a array Y = [1 2 2 2 2 2 3 3 4 4]; i.e. total eleme...

10 years ago

Solved


Detect pair of equal values in a Matrix
A 2D matrix of 2 rows and N columns with random integer numbers. A = [3 1 2 4 6 6 7; 7 3 2 1 5 2 4] ...

10 years ago

Solved


Juggler sequence revisited
This problem is related to <http://www.mathworks.com/matlabcentral/cody/problems/42835-return-the-sequence-element-ii Problem 42...

10 years ago

Solved


most frequent character
Obtain most frequent character Let s='balaram'; output='a';

10 years ago

Solved


Babylonian method
Calculate the square root of a given positive number a using the Babylonian method (https://en.wikipedia.org/wiki/Methods_of_co...

10 years ago

Solved


center of mass
R is a given matrix with size [n,2]. R(i,:) is interpreted as the 2D-position of a mass point with mass i. Calculate the center ...

10 years ago

Solved


Fast 1-D Convolution (full shape)
This is the first problem in the <http://www.mathworks.com/matlabcentral/cody/?term=Fast+1-D+Convolution fast 1-D convolution se...

10 years ago

Solved


house of cards
How many cards do one need to build a house of cards with n stages? Short explanation: /\ 2 cards for 1 stage ...

10 years ago

Solved


Approximate e
Given a and n, compute and approximation to f = a * e ^ n, without the use of exp, string operations, or floating point numbers....

10 years ago

Solved


means
Calculate the arithmetic, the geometric and the harmonic mean of a given vector (with positive elements) and return them in a ve...

10 years ago

Solved


Sum of Logarithms
Given a vector, v, of real positive numbers, compute the sum, s, of the base-10 logarithms of the elements of v, without the use...

10 years ago

Solved


Number of divisors of a given number
Given a Number n, return the number of his divisors without listing them example: n=14 ; Divisors={1,7,2,14} ; y=4 n=...

10 years ago

Problem


Number of divisors of a given number
Given a Number n, return the number of his divisors without listing them example: n=14 ; Divisors={1,7,2,14} ; y=4 n=...

10 years ago | 2 | 66 solvers

Solved


How many ways to write a number
Given two positive numbers n and k, where n>=k. In how many ways can we write n as sum of k positive numbers. Same numbers but d...

10 years ago

Solved


Regular polygon bounded by and bounding a circle
As the number of sides (or vertices) of a regular polygon goes to infinity, its perimeter and area go to the perimeter and area ...

10 years ago

Solved


Raise a polynomial to a power
In Matlab, polynomials are represented by a vector of coefficients. For example, the polynomial p=a*x^2 + b*x + c is represente...

10 years ago

Solved


the "power matrix" of two vetcors
Given two row vectors x,y of lengths m and n (resp.), create an m x n matrix whose i,j entry is x(i)^y(j).

10 years ago

Solved


Is the paranthesis sequence balanced ?
Quantum mechanics and computer science are interested in <http://en.wikipedia.org/wiki/Bra%E2%80%93ket_notation bra-kets>. Today...

10 years ago

Solved


Add more zeros
Find code that adds one 0 to each sequence of 0 in a string (composed with only 0 or 1). For example: '1010' -> '100100' ...

10 years ago

Solved


Is 3D point set Co-Planar?
This Challenge is to determine if four 3D integer points are co-planar. Given a 4x3 matrix representing four x,y,z integer poin...

10 years ago

Solved


Mersenne Primes vs. All Primes
A Mersenne prime (M) is a prime number of the form M = 2^p - 1, where p is another prime number. <https://www.mathworks.com/matl...

10 years ago

Solved


Integer sequence - 2 : Kolakoski sequence
Get the n-th term of <https://oeis.org/A000002 Kolakoski Sequence>.

10 years ago

Load more