Resuelto


expand intervals vol.2
Similar to problem <http://www.mathworks.co.uk/matlabcentral/cody/problems/2528 2528>. This is a more general case, when bounds ...

más de 6 años hace

Resuelto


expand intervals
You're given a row vector of an even number of monotonically increasing integers. Each pair of consecutive integers is the lower...

más de 6 años hace

Resuelto


Replace pattern 0 1 0 and 1 0 1
Find and replace a pattern in a row of zeroes and ones. * Find 1 0 1 and replace it with 1 1 1 * Find 0 1 0 and replace it w...

más de 6 años hace

Resuelto


Generate the Matrix!
Given n, generate the following matrix: a = [ n n-1 n-2 ... 2 1; n-1 n-1 n-2 ... 2 1; n-2 n-2 n-2 ... 2 1;...

más de 6 años hace

Resuelto


Replace values under a limit
For a vector x and number n, the goal is to find every element of x inferior to n and replace it by n. Example x= [ 1 2 3...

más de 6 años hace

Resuelto


Count number of words in string
Count number of words in string Examples 'hi', answer is 1 'hi hi', answer is 2 'I enjoy cody', answer is 3

más de 6 años hace

Resuelto


Narcissistic problem
How many likes has this problem?

más de 6 años hace

Resuelto


Sideways sum
Given natural number calculate its _population count_.

más de 6 años hace

Resuelto


pressure to dB?
given x ratio of pressure, find corresponding y dB

más de 6 años hace

Resuelto


Determine digits of the Copeland-Erdos constant
<https://www.mathworks.com/matlabcentral/cody/problems/1477-champernowne-constant/solutions/new Cody Problem 1477> asks us to de...

más de 6 años hace

Resuelto


Fill an array given a sum and array length values
Fill an array with random numbers so that their sum and array length will be equal to the given values as input. Function will ...

más de 6 años hace

Resuelto


How unique?
Sometimes, when we check unique entries of vector we would like to know how many times each value occurs. Given vector of num...

más de 6 años hace

Resuelto


Max Change in Consecutive Elements
If an array is given as input then find the index of consecutive elements that represent maximum change. Example: Input ...

más de 6 años hace

Resuelto


counting groups!
This problem is about counting groups. Example If you have x: x = [0.8 0.8 0.8 0.3 0.3 0.4 0.5 0.6 0.6 0.9] then a...

más de 6 años hace

Resuelto


Time Expansion
How can you slow down any discrete-time signal? Example Input original signal x. x = [1 2 3 -1 -2 -5 -4] We want t...

más de 6 años hace

Resuelto


Largest territory
Determine whose territory is largest. If there are multiple numbers tied for the largest territory, return the smallest number. ...

más de 6 años hace

Resuelto


Simpsons's rule (but not Homer Simpson)
I wonder what Homer Simpson would have thought of Simpson's rule? Somehow I doubt his thoughts would have included the phrase Ne...

más de 6 años hace

Resuelto


Create tangent function out of sine function only
Please don't use cosine and tangent functions

más de 6 años hace

Resuelto


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

más de 6 años hace

Resuelto


Create cosine function out of sine
Please dont use cos(x) directly

más de 6 años hace

Resuelto


Grazing-01
A cow is tied to an outside corner of a rectangular barn of size (a,b) with a rope of length l. What is the maximum area the cow...

más de 6 años hace

Resuelto


Take it out
Consider the integer number sequence N (1 to infinity). After each iteration, take out the (k+1)th elements; where k is the n...

más de 6 años hace

Resuelto


The Tortoise and the Hare - 01
Suppose in an infinitely long line, the hare is standing in position 0. From that place, it can jump either in the +ve direct...

más de 6 años hace

Problema


Construct a prime circle
A <https://mathworld.wolfram.com/PrimeCircle.html prime circle> is a circular arrangement of the numbers 1 to 2n such that pairs...

más de 6 años hace | 7 | 53 solvers

Resuelto


Replace 0 to NaN!
In given matrix A=[1 nan nan; 2 2 nan; nan nan 1]; replace NaN to 0. Use matrix A as a input.

más de 6 años hace

Resuelto


Orthogonal lines
Check whether two given lines are orthogonal or not. Two lines are orthogonal if they create a right angle at their intersect...

más de 6 años hace

Resuelto


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

más de 6 años hace

Resuelto


remove single elements
Given a vector of integers, remove the elements that have appeared only once. The output elements should be in exact order as th...

más de 6 años hace

Resuelto


Find the area of a rectangle if length of the diagonal is given.
if length of a diagnonal in rectangle is 5. Its area is 12.

más de 6 años hace

Resuelto


Is it column vector?
Is it column vector? Check vector for column vector without using iscolumn function.

más de 6 años hace

Cargar más