Solved


Don't Include a Five (Part Two)
Given a vector A with at least one non-five, return vector B, with all fives excluded (not replaced by zeros).

5 months ago

Solved


Don't Include a Five
Given a vector A, return vector B with all 5s replaced with 0s.

5 months ago

Solved


High Five!
Write a function that takes a number x and returns y = 'High Five' if x is not equal to five. Return y = 'Denied' if the number ...

5 months ago

Solved


A Five Introduction
Write a function that takes a number x as an input and returns the same value as y, unless x = 5, in which case the function sho...

5 months ago

Solved


Easy Sequences 9: Faithful Pairs
A "faithful number" is a non-prime number that is one less or one more than some prime number but not both. For example, for num...

5 months ago

Solved


Easy Sequences 12: 50th Prime
Write a function that outputs the th prime after a given number . For example, the th prime after is . NOTE: If itself is pr...

5 months ago

Solved


Easy Sequences 11: Factorial Digits without Trailing Zeros
Here is an easy one... It is not difficult to count the number of digits of the factorial of a given number. For example for 'n...

5 months ago

Solved


Easy Sequences 6: Coefficient sums of derivatives
Consider the polynomial function and its first-order derivative . The sums of the coefficients of P and P', are and , respecti...

5 months ago

Solved


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 months ago

Solved


Solve the picross! (Hard)
Solve the picross! http://en.wikipedia.org/wiki/Nonogram The arguments (horz and vert) are cells containing the clues, e.g...

5 months ago

Solved


Easy Sequences 10: Sum of Cumsums of Fibonacci Sequence
The function F(n) is defined as the set of Fibonacci numbers from the first up to the n-th. S(n) is the result of applying to F,...

5 months ago

Solved


Easy Sequences 5: Project Euler Problem 1 - Again!
We are all familiar with Project Euler Problem 1. This time let's try it on bigger multiples and larger range. Find the sum of ...

5 months ago

Solved


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 months ago

Solved


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 months ago

Solved


Easy Sequences 1: Find the index of an element
The nth element of a series is defined by: . Obviously, the first element . Given the nth element , find the value of the corre...

5 months ago

Solved


Estimating Euler's (Oi-ler-z) Number
Euler's number is an irrational constant given by Starting with x=0, count the number of times you can add a uniformly distrib...

5 months ago

Solved


Next Tribonacci Number
The "Tribonacci" sequence is an extension of the idea of the Fibonacci sequence: That is, each new term is the sum of the thr...

5 months ago

Solved


Generate Tribonacci Sequence
The "Tribonacci" sequence is an extension of the idea of the Fibonacci sequence: That is, each new term is the sum of the thr...

5 months ago

Solved


Generate Pascal's Triangle Matrix
Pascal's triangle is an arrangement of numbers where each value is the sum of the values adjacent to it in the previous row: ...

5 months ago

Solved


Interpolated Value Between Two Points
Given two points, and , a new location x, and a method "linear" or "cubic", return the value of a linear or cubic interpolant t...

5 months ago

Solved


A Binary Search
One way to locate a target value in a sorted array, is to use a binary search algorithm. Here, you test if the midpoint in the a...

5 months ago

Solved


Where the Four Corners Am I? (Vectorized)
NOTE: this problem is intended to build on problem #55960 ("Where the Four Corners Am I?"). You may wish to solve that problem f...

5 months ago

Solved


Taylor Series
You can use a Taylor series to approximate common functions. The Taylor series for sin(x) is Using only the first several te...

5 months ago

Solved


Calculate Angle From Axis
Given coordinates x and y, an axis ("X" or "Y"), and a direction ("cw" or "ccw", meaning clockwise and counterclockwise, respect...

5 months ago

Solved


Temperature Conversion Utility (Strings)
This is a follow-on problem to <http://www.mathworks.com/matlabcentral/cody/problems/2413-temperature-conversion-utility Problem...

5 months ago

Solved


Solve the picross! (Easy)
Solve the picross! <http://en.wikipedia.org/wiki/Nonogram> The arguments (horz and vert) are cells containing the clues, e...

5 months ago

Solved


Shuffle
Shuffle a vector by breaking it up to segments of |n| elements, and rearranging them in a reversed order. For example, the ve...

5 months ago

Solved


Accurate Division
Given three integers x, y and d, return x/y (as a string) to d significant digits. Remove leading and trailing zeros. Example...

5 months ago

Solved


Compute Area from Fixed Sum Cumulative Probability
In Matlab the code v = rand(1,3); v = v/sum(v); is sometimes suggested as a convenient means of generating three random var...

5 months ago

Solved


What are the odds?
Two numbers, A and B are drawn randomly and uniformly on [-R,R]. What is the probability that A*B < A+B. Your function should ...

5 months ago

Load more