Solved


Mix it up!
Given an input string S, return a new string B, that is created by taking one character from the front and then the end iterativ...

13 days ago

Solved


Tic Tac Toe Solver
Create a function that checks n number of tic tac toe boards housed in a 3x3xn matrix where the x's are represented as 1's (and ...

13 days ago

Solved


Repeat middle rows and columns of an array
Given an MxN numeric array (A), return an array (B) in which the middle rows and columns have each been repeated once. It may be...

13 days ago

Solved


Pick the die most likely to win
After discussing Rock, Paper, Scissors, Lizard, Spock in The Simpsons and their Mathematical Secrets, Simon Singh writes that in...

13 days ago

Solved


A Simple Shielding Problem

13 days ago

Solved


Periodic Table II 101.
Given the symbol of an element, return its atomic number. This is the continuation of <http://www.mathworks.com/matlabcentral/co...

13 days ago

Solved


Substring Extraction
In a given string, find the substring between Start_string and End_string. You will have to include or exclude the Start_str...

13 days ago

Solved


Bleed non-zeros to the right
What a title! Yet, it says what I mean. You get a vector, some values and a lot of zeroes. Every zero is replaced by the firs...

13 days ago

Solved


Assign matrix rows/columns to separate variables
This is a slight variant of <http://www.mathworks.com/matlabcentral/cody/problems/2668-assign-matrix-elements-to-separate-variab...

13 days ago

Solved


¡Puntos de corte!
Crea una función que permita calcular los puntos de corte con los ejes X e Y de una función cuadrática indicada por el usuario e...

13 days ago

Solved


Sort (high on middle, low on ends)
Sort the vector of numbers in order low-high-low. Even numbers appear in ascending order on the left and odd numbers appear in d...

13 days ago

Solved


Rewrite setdiff to account for non-unique values
Setdiff(a,b) is a function that will remove all values of b from a. Sometimes, you need this function to do a little bit extra,...

13 days ago

Solved


Create an 'arrow-head" matrix
Write a function that when given an odd number, produces an arrow-head function pointing to the right. Examples n = 3 ...

13 days ago

Solved


De-primed
Write a function that will multiply every prime number in the array or matrix by two, leaving all other numbers the same, and re...

13 days ago

Solved


Rolling maximums above a threshold
You are given either a vector or a 2-D matrix M and a threshold value of t. Write a script that will calculate how many times t...

13 days ago

Solved


Regex match
Many regular expression engines have a simple function to quickly know whether a regular expression entirely matches a string or...

13 days ago

Solved


Wheat on a chessboard pt 1
If a chessboard were to have wheat placed upon each square such that one grain were placed on the first square and each successi...

13 days ago

Solved


Multiply Column
Given two input, one matrix and one scalar number For example A is a matrix given A = [ 1 2 2 5 2 5 2 3 4 6...

13 days ago

Solved


Pell numbers
Find the nth pell number <https://en.wikipedia.org/wiki/Pell_number>

13 days ago

Solved


Sum the elements in either diagonal of a square matrix
Sum the elements of a square matrix that lie on either the major diagonal or anti-diagonal. (Include all elements that are part ...

13 days ago

Solved


Reindex a vector (★★)
(copy of Prob. 676) You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX h...

13 days ago

Solved


generate the matrix
given 3 inputs e.g [2,3,4] -- generate a matrix like below -- [2 2 0 0 0 0 0 0 0; 2 2 0 0 0 0 0 0 0; 0 0 3 3 3 0 0 0 0; 0 0...

13 days ago

Solved


Easy Sequences 23: Hat Guessing Game!
Consider the following Game Show: Hats, with numbers written on each, were placed on the heads of the participants. Participant...

13 days ago

Solved


Armstrong Number
Write a function name armstrong_check that checks whether the given input is an Armstrong Number or not. It returns logical True...

13 days ago

Solved


Edges of a n-dimensional Hypercube
Return the number of edges on an <http://en.wikipedia.org/wiki/Hypercube _n_-dimensional hypercube> (with an integer n &ge; 0). ...

13 days ago

Solved


Binary Coder
Take an input number and print the binary value of this number.

13 days ago

Solved


Find the definite integral of various linear functions
A definite integral had a minimum and maximum limit. When you solve this type of problem you must use both quad and the trapz fu...

13 days ago

Solved


The Ultimate Water Challenge ( Expert )
Description: In the previous problems, you were given a target T and asked to find the minimum number of steps to reach it. ...

13 days ago

Solved


Find best domino orientation
Given a list of pairs, find the orientation they should be placed in a line, such that the sum of the absolute values of the dif...

13 days ago

Load more