Risolto


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

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Risolto


Narcissistic problem
How many likes has this problem?

oltre 6 anni fa

Risolto


Sideways sum
Given natural number calculate its _population count_.

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Risolto


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

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

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

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

oltre 6 anni fa | 7 | 54 risolutori

Risolto


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.

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Risolto


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.

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Carica altro