Solved


LocateMembership | Membership of Matrix in another matrix
Let a and b be given by a = [ 2 1 1 1 1 2 1 1 1 1 2 1 1 1 1 2 4 0 0 0 ] b = [ 2 1 ...

2 months ago

Solved


Determine if given number is perfect
A number is perfect if it is equal to the sum of its factors, excluding itself. Example The number 6 is perfect since its fact...

2 months ago

Solved


Back to the future
See test suite See also: http://www.mathworks.com/matlabcentral/cody/problems/2449-back-to-the-future-ii

2 months ago

Solved


Back to the Future III
Marty McFly and Doc Brown are "back" again. See the test suite to see what they are up to.

2 months ago

Solved


Back to the future II
See test suite

2 months ago

Solved


self description 2.0
New (and way easier) hacking problem built upon <http://www.mathworks.com/matlabcentral/cody/problems/1969 Alfonso's problem 196...

2 months ago

Solved


Initialize a varible with an integer value from a another variable which is assigned with a character value.
Initialize a varible with an integer value from a another variable which is assigned with a character value. ex: Test = 'c'...

2 months ago

Solved


Text Processing - New
Derived from problem 2440. A string containing several sentences are given as input. If any sentence contains the word 'great...

2 months ago

Solved


Clear functions with the same name in different packages independently
See the test suite. N.B.: Overwriting files or functions a.k.a. cheating is not necessary.

2 months ago

Solved


all possible subsets of set
Given a vector, return all possible subsets of the vector in a cell array. Properties of basic set theory is assumed to be valid...

2 months ago

Solved


Fair Scoring for Cody
The length-based scoring system for Cody has a few well-known loopholes that allow clever programmers to hide complex code insid...

2 months ago

Solved


Filter British English into American English
Given a sentence written with British spelling, return the sentence with the offending word(s) replaced with the American spelli...

2 months ago

Solved


Unusual Concatenations
The sum of the squares of certain unusual integers is equal to the concatenation of their individual digits. For example: ...

2 months ago

Solved


Case-insensitive Character Detection
Find the index of a particular character in a string ignoring case. Example Input: x = 'aAbhhfdf' n = 'a' ...

2 months ago

Solved


Matrix Generation.
if input n =1, generate a matrix y = [1]

2 months ago

Solved


Calculate the h-index
H-index is a powerful tool for quantifying the scientific contribution of a researcher. H-index is defined as follows (source - ...

2 months ago

Solved


Sum of Dividend Digits
Find the smallest number that consist of only number 1's (e.g. 11111111111) which satisfy a given divisor and remainder. Then re...

2 months ago

Solved


Graph Algorithms - 2 : Chromatic Number
Chromatic number of a graph is the minimum number of distinct colors required to color all the vertices of the graph such that n...

2 months ago

Solved


Signal Processing Basic - 1. Stretch a signal
Input vector V is a discrete time signal assuming the first sample is sampled at t=0. This signal has to be stretched in time. ...

2 months ago

Solved


grazing cows
Here is a fun problem I encountered in high school. Two cows are grazing in an enclosed square-shaped field of side length s ...

2 months ago

Solved


Graph Algorithms - 1 : Length of the largest closed path
An undirected simple graph is given as the form of an adjacency matrix. Find the length of the largest closed path (one that sta...

2 months ago

Solved


Musical Note Interval 1 - Diatonic Scale
Assuming a simple diatonic C scale, calculate the interval (integer) between two notes (provided as strings). By applying number...

2 months ago

Solved


Open coded lock.
Guess the <hint://fliplr(anchortext) password> or break the <2314/solutions/new#test_suite_body lock>.

2 months ago

Solved


Find the first N zeros of the 666 function
Using the following definition of the 666 function for this problem: _f(n)=sin('nnn')-cos(n*n*n)_, write a function that returns...

2 months ago

Solved


Get the variable value from a string and generate sum
Get the variable value from a string. Example. x = 'A=10' y = 'B=20' Result = (x+y) Result = 30

2 months ago

Solved


Convert a number to its Roman representation
Convert a given number to its Roman representation. For example, if the number is 98, it should display 'XCVIII'

2 months ago

Solved


Given a number between 1-365 (a day number in a non leap year) , find what day of what month it is.
For a given number between 1-365 (a day number in a non leap year), you should check which day of which month it is. for exampl...

2 months ago

Solved


Sales Prediction
Miss X is a shopaholic person and every weekend she goes to a mall. There are total of 10 shops. Miss X starts from shop #1 and ...

2 months ago

Solved


GJam 2011 Africa Qualifier C: House, maximum area rectangle
This Challenge is derived from <http://code.google.com/codejam/contest/837485/dashboard#s=p2 GJam 2011 Africa: Building a House>...

2 months ago

Solved


I want eval
A valid MATLAB statement containing a definition of a vector is passed as a string S. Determine the length of the vector. Inp...

2 months ago

Load more