Solved


İmage Series 2 AND
Given two input first one is a number which is uint8, second one is image which is 8 bit gray scale image, the image has pixsels...

8 years ago

Solved


Cut an orange
Inspired by problem <http://www.mathworks.co.uk/matlabcentral/cody/problems/2175 2175>. A hungry matlab enthusiast has an ora...

8 years ago

Solved


Mean ignoring NaNs
Define a function that behaves in the same way as mean(x) and mean(x,d) except that it ignores NaNs (unless all of the values be...

8 years ago

Solved


Create a New_Word
The output of the function is a new word created from the word entered into the function. The new word is created by deleting th...

8 years ago

Solved


Return ! if array element starts with a certain letter. Otherwise return ?
Input x=['try' 'once' 'more']; s='t' Output ans='!' Input x=['try' 'once' 'more']; s='O' Output ...

8 years ago

Solved


replace nan values iteratively.
replace nan values with the average of two neighbour non-nan value iteratively as follow; x = [2; 4; 6; nan; nan; nan; 10]; ...

8 years ago

Solved


Cell Array Inception?
Jimmy is a beginning MATLAB student who is trying to read in a text file and build a cell array of strings, where A{k} is the kt...

8 years ago

Solved


Only once: cleaning up your columns
We have a logical array (with ones and zeroes). It is simple: after processing every column may only contain a single true value...

8 years ago

Solved


Negation and new variables
Inspired by Problem 1827 by Andrew Newell. Write a function that has the following property: (x~=y) neg3(x)=x; neg3...

8 years ago

Solved


Ulam spiral 2: The revenge
Starting from the problem <https://www.mathworks.com/matlabcentral/cody/problems/2644-the-ulam-matrix>, transform the Ulam Matri...

8 years ago

Solved


time difference
The arrays x and y contain time values in the form of: x = [hours minutes seconds] Create the output z which contains the...

8 years ago

Solved


Persistence will help you solve almost any problem.
Create a function without inputs that adds one to the output every time it is called. a = counterfun; disp(a) >> 1 ...

8 years ago

Solved


Calculate vowel / consonant ratio of a string
Given a string, calculate the ratio of vowels to consonants for example : x = 'This is a very good Day!' y = 7/11

8 years ago

Solved


USC Fall 2012 ACM : Code Word Minimum Flipped Bits
This Challenge is to solve Question A of the <http://contest.usc.edu/index.php/Fall12/Home USC ACM Fall 2012 Contest>. Given ...

8 years ago

Solved


Schrödinger dog
Everyone knows that dogs are less unpredictable than cats. But is that proven? Is that measurable at all? YES! NOW IT IS! ...

8 years ago

Solved


Seemingly impossible problem
This is a _seemingly_ 'impossible' problem, because variously your function, "impossibleFn", must return an output of either 1 o...

8 years ago

Solved


Find index of a string in a cell array
Write a function that finds the index at which the cell array of strings C contains the exact string S. So if C = {'twe...

8 years ago

Solved


Look and say Conway's sequence
In mathematics, the look-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, 312211, ...

8 years ago

Solved


Euclidean inter-point distance matrix
The Euclidean distance between two points in a p-dimensional space is a really common thing to compute in the field of computati...

8 years ago

Solved


convert between ascii and characters
I have seen multiple problems like this but none of them have a robust test suite associated with them. The first input C is ...

8 years ago

Solved


remove nans fast
There are several ways to locate and remove nans in a matrix, and return an 1d row vector. In this problem the challenge is ...

8 years ago

Solved


Chess ELO rating system
The Elo rating system is a method for calculating the relative chess skill levels of players in competitor-versus-competitor gam...

8 years ago

Solved


Check if any duplicates in your data
Given an array x, return a number n equal to the largest number of repetitions in your data. For example: If x=[1 2 3 6 8 4 9]...

8 years ago

Solved


Counting the Grand Primes
A grand prime pair is a pair of primes, p1 and p2=p1+1000, such that both numbers are prime. Like a twin prime pair, where the d...

8 years ago

Solved


Weighted moving average
x1=[1 2 1]; y1=[1 2 2 4 5 6 6 8]; Make function for weighted moving average. z(i)=(x1(i)*y1(i)+x1(i+1)*y1(i+1)+x1(i+2)*y1...

8 years ago

Solved


Create an 8-color version of an image
This problem was inspired by a tweet I saw from @MATLAB regarding <http://www.mathworks.com/matlabcentral/fileexchange/37816-the...

8 years ago

Solved


Mann-Kendall Correlation
Write a function that returns the <http://en.wikipedia.org/wiki/Kendall_tau_rank_correlation_coefficient Mann-Kendall> correlati...

8 years ago

Solved


Negative without '-'
Simple: return a negative number without using the '-' sign. Thanks to Problem <https://www.mathworks.com/matlabcentral/cody/...

8 years ago

Solved


Convert this color - RGB Vector to Hex String
Given a 3 element RGB vector corresponding to a color (given by the MATLAB color spec <http://www.mathworks.com/help/matlab/ref/...

8 years ago

Solved


Composite Trapezoidal Rule for Numeric Integration
Use the trapezoidal rule to numerically integrate a function, _f(x)_, passed as the first argument, between upper and lower limi...

8 years ago

Load more