Solved


Data decompression
A chunk of data is to be 'decompressed'. Input: * compressed: a row vector of uint8 values. This is the compressed data. ...

5 years ago

Solved


Extract Built In Functions and Toolbox Functions from String or Function Handle
Find the Built-In functions and Toolbox functions in either a string or a function handle. Generate a string of alphabetized ...

5 years ago

Solved


Count letters occurence in text, specific to words with a given length.
Build a function with two input arguments: a string and a word length (number of letters), that outputs a vector of counts of th...

5 years ago

Solved


Alphabetize by last name
Given a list of names in a cell array, sort the list by the last name. So if list = {'Barney Google','Snuffy Smith','Dagwood ...

5 years ago

Solved


Remove the polynomials that have positive real elements of their roots.
The characteristic equation for a dynamic system is a polynomial whose roots indicate its behavior. If any of the roots of the p...

5 years ago

Solved


Find common elements in matrix rows
Given a matrix, find all elements that exist in every row. For example, given A = 1 2 3 5 9 2 5 9 3 2 5 9 ...

5 years ago

Solved


Find state names that start with the letter N
Given a list of US states, remove all the states that start with the letter N. If s1 = 'Alabama Montana Nebraska Vermont Ne...

5 years ago

Solved


Interpolator
You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

5 years ago

Problem


Easy Sequences 4: Eliminate the Days of Confusion
If a date is written in purely numeric format some dates can be confusing, if we don't know the date format used. For example, "...

5 years ago | 3 | 25 solvers

Solved


Largest Geometric Series
Extension of Ned Gulley's wonderful <http://www.mathworks.com/matlabcentral/cody/problems/317 Problem 317>. In a geometric se...

5 years ago

Problem


Easy Sequences 3: Prime 44-number Squares
The positive integers 62 and 238 are related. Their squares (3844 and 56,644) both end in '44'. In fact, 62 and 238 are the 3rd ...

5 years ago | 1 | 37 solvers

Solved


Get all prime factors
List the prime factors for the input number, in decreasing order. List each factor. If the prime factor occurs twice, list it as...

5 years ago

Solved


choose the even number
find all even number in vector x Example: x = [1 2 3 4 5 6 7 8 9 10] y = [2 4 6 8 10]

5 years ago

Solved


Double Fibonacci
double_fibonacci takes two integers, each greater than one, as input arguments (it does not have to check the format of the inpu...

5 years ago

Solved


Vector to Decimal
Given an integer vector , return its decimal representation as a character array. % Examples v = 7 x = '7' % v = [4 2] x...

5 years ago

Problem


Easy Sequences 2: Trigonometric function with integral input and output
The function 'F', defined as: , will always return an integer if the input is a natural number (in radian...

5 years ago | 1 | 46 solvers

Solved


Easy Sequences 1: Find the index of an element
The nth element of a series A is defined by: . Obviously, the first element A(1) = 1. Given the nth element 'A(n)', find the val...

5 years ago

Problem


Easy Sequences 1: Find the index of an element
The nth element of a series A is defined by: . Obviously, the first element A(1) = 1. Given the nth element 'A(n)', find the val...

5 years ago | 1 | 56 solvers

Solved


Find similar sequences
Another problem inspired by a question on the <http://www.mathworks.com/matlabcentral/answers answers> forum. Given a matrix ...

5 years ago

Solved


Sort Except Zeros
Sort the numbers in a vector. But the position of zeros should not be changed. Example: sort_except_zeros( [5 3 0 0 2 4] ) == [...

5 years ago

Solved


Find the nth composite number.
Everyone heard about the nth prime number. Let's try to find out the nth composite. For example , 1 is the first composite, 10 i...

5 years ago

Solved


Get to a number faster.
If you start with $1 and, with each move, you can either double your money or add another $1, what is the smallest number of mov...

5 years ago

Solved


3n + 1 Problem (a.k.a The Collatz Conjecture)
The 3n + 1 problem (a.k.a The Collatz Conjecture) Consider the following algorithm to generate a sequence of numbers. Start wit...

5 years ago

Solved


Pandigital Multiples of 11 (based on Project Euler 491)
A "Pandigital number of order X" is one that contains all of the numbers from 0 to X, but with no leading zeroes. If X>9, the cy...

5 years ago

Solved


Approximation of Pi (vector inputs)
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given numbe...

5 years ago

Solved


Generate Square Wave
Generate a square wave of desired length, number of complete cycles and duty cycle. Here, duty cycle is defined as the fraction ...

5 years ago

Solved


geometric progression
I've modified my <http://uk.mathworks.com/matlabcentral/cody/problems/2800-arithmetic-progression previous program> so that it n...

5 years ago

Solved


arithmetic progression
I've written a program to generate the first few terms of <https://en.wikipedia.org/wiki/Arithmetic_progression arithmetic progr...

5 years ago

Solved


letter yes yes & letter no no
Split a string into two strings, wherein the first string has all alphabetic letters and the second string has all the remaining...

5 years ago

Load more