Solved


Find the nearest prime number
Happy 5th birthday, Cody! Since 5 is a prime number, let's have some fun looking for other prime numbers. Given a positive in...

2 months ago

Solved


5 Prime Numbers
Your function will be given lower and upper integer bounds. Your task is to return a vector containing the first five prime numb...

2 months ago

Solved


Missing five
Convert decimal numbers to a base-9 notation missing the digit *5* <<http://www.alfnie.com/software/missing5.jpg>> Too man...

2 months ago

Solved


Pentagonal Numbers
Your function will receive a lower and upper bound. It should return all pentagonal numbers within that inclusive range in ascen...

2 months ago

Solved


Twin Primes
Twin primes are pairs of primes that are immediately next to each other (difference of two). The lesser of twin primes are 3, 5,...

2 months ago

Solved


Find the Pattern 10

2 months ago

Solved


Decimation - Optimized for speed
This problem is similar to http://www.mathworks.com/matlabcentral/cody/problems/1092-decimation, only this time the score will b...

2 months ago

Solved


Flexible Anonymous Function
Given a function handle, return a handle to a function that would accept an arbitrary number of inputs, applies the function to ...

2 months ago

Solved


function on a moving window
Create a function that applies an operation (such as @sum, @mean, @std, @norm etc) to a moving window of the data. First exampl...

2 months ago

Solved


Create a function handle that reverses the input arguments of another function handle
Given a function that takes two input arguments and returns one output, create another function handle that performs the same op...

2 months ago

Solved


Apply Function to Each Field of a Structure Array: Part 2
The builtin <http://www.mathworks.com/help/matlab/ref/structfun.html?=structfun structfun> applies a function handle to each fie...

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

2 months ago

Solved


Function Sniffer
Given a string, find out which built-in functions are present, output a simple string, that has sorted and unique list of the...

2 months ago

Solved


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

2 months ago

Solved


Make an anonymous function that has variable output
Make a anonymous function that has variable output. f = @(x)... the following equation→equation(s) as followed has(ve) ...

2 months ago

Solved


First use of arrayfun() and anonymous function @(x)
Create an anonymous function using @(x) for a parabola equation for the given coefficients stored in s with s(1)x2 + s(2)x + s(...

2 months ago

Solved


the average value of the elements
Calculate the average value of the elements in the array

2 months ago

Solved


calculate the length of matrix
input 1 array, calculate the length

2 months ago

Solved


Find the max element of the array
Find the max element of the array

2 months ago

Solved


Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.

2 months ago

Solved


The Five Infection (Boss Level)
Given a 3x3 matrix A, replace: every value that is equal to five every value that is directly adjacent to a five with zero in...

2 months ago

Solved


Fives Begone
Given any sentence as an input value 'sentence', turn all fives into the letter X and return the improved sentence. Also, turn a...

2 months ago

Solved


Broken Clock
Create a function that outputs t, an inputted matrix time x, in hours and minutes (hr:min) unless the time contains a five. In t...

2 months ago

Solved


No Fives Permitted
Create a function that gives users an custom error message if the matrix A contains a five. The error message should say "No Fiv...

2 months ago

Solved


A Fiveless Factorial
Given a positive integer x, compute its factorial y, but exclude any muliplication by five if applicable.

2 months ago

Solved


Don't Sum a Five
Create a function that sums the first and last element of a muti-element vector unless the value of one of the elements is 5. Do...

2 months ago

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

2 months ago

Solved


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

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

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

2 months ago

Load more