Solved


Delete the rows in the middle
We will delete the rows in the middle and keep the first and the last rows. For example if input is [1 2 1 7 1 8 ...

2 years ago

Solved


Only once: cleaning up your columns
We have a logical array (with ones and zeroes). It is simple: after processing every column may only contain a single true value...

2 years ago

Solved


Draw a X
Given an input , create a square matrix of zeros with an X of ones. Ex. n = 3 drawX(3) [ 1 0 1 0 1 0 1 0 1 ] ...

2 years ago

Solved


String Logic 16
Examples: 'DIG' --> 'DIG' 'KIMBALL' --> 'ALLKIMB' 'DEAL' --> 'EALD' 'LIMB' --> 'IMBL' 'MADE' --> 'ADEM'

2 years ago

Solved


Draw a x-by-x matrix 'Denmark flag'(Euro(2020)
Draw a x-by-x matrix 'Denmark flag' using '4' and '1'.(x is odd and bigger than 4) Number 4: Caption S.Kjær and number 1: K.S...

2 years ago

Solved


Draw "T" inside a Zero Matrix
Given a x-by-x matrix filled with zeros (x> 2). Use 1 to draw a letter "T" into it! Like this: x = 5, y = 1 1 1 1 1 0 0 1 0 0...

2 years ago

Solved


Rearrange string
Input is a given string. Output is the number of ways to rearrange the string.

2 years ago

Solved


Repeat string n times - 2
This is the two variable version of <http://www.mathworks.com/matlabcentral/cody/problems/42482-repeat-string-n-times Repeat str...

2 years ago

Solved


Number Puzzle - 035

2 years ago

Solved


Get the n-th rand number with given seed
Given seed s, return the n-th rand number using rand(). Round the answer with 4 digits. n is a postive integer.

2 years ago

Solved


Find the number of primes less than input
Given an integer n, determine the number of primes less than or equal to n.

2 years ago

Solved


Area of a regular hexagon
Given the length of a side of a regular hexagon, return its area rounded to two decimal places.

2 years ago

Solved


Drying sweater?
* A sweater is revolving in a slow low power dryer and losing moisture at any moment at the constant rate 100% of its current mo...

2 years ago

Solved


Mean number of letters per word (Easy)
Given a character array, s, representing a sentence, return a, the arithmetic mean of the number of letters per word in the give...

2 years ago

Solved


Variance computation (★★★)
Given a vector x with several values, compute the variance, whose formula is given by: <<https://i.imgur.com/Wg95KBE.gif>> ...

2 years ago

Solved


How many apples
You have x apples I take from you y apples now how many apples you have ?

2 years ago

Solved


vector indexes for a matrix
Matlab allows us to use several indexing styles making code simpler and easier to read than using loops. Vectors can have ve...

2 years ago

Solved


Calcular la razón de proporcionalidad
Dadas dos magnitudes (a y b) en forma de vectores, crear una función que permita obtener la razón de proporcionalidad _*m*_ sólo...

2 years ago

Solved


Find if a given sentence is a palindrome
Given a string/character array, return true if the string is a palindrome else returns false. For example: sample_text =...

2 years ago

Solved


MinMax
* x=[2 4 3 1 6 4 6] * output , y=[1 6 2 4 3] here,y(1) is the minimum of x, y(2) is the maximum of x, y(3) is the 2nd mini...

2 years ago

Solved


A kind of decryption
Please convert the vector to letters by referring to the examples below. (eg.1) input vec=[34 1 59] >>> output s='A Z' (eg...

2 years ago

Solved


Differential equations I
Given a function handle |f| an initial condition |y0| and a final time |tf|, solve numerically the differential equation dy...

2 years ago

Solved


Monte-Carlo integration
Write a function that estimates a d-dimensional integral to at least 1% relative precision. Inputs: * d: positive integer....

2 years ago

Solved


Throwing Dice - Will You Be Eaten By The Dragon?
You and a dragon have agreed to let dice rolls determine whether it eats you or not. The dragon will roll a single die, of x si...

2 years ago

Solved


Compute the number of squares a knight can reach after n moves
Several Cody problems involve knights from chess. They have asked players to find a knight’s tour in a matrix (CP 96), determine...

2 years ago

Solved


Hamiltonian Cycle
This is related to the Travelling Salesman Problem 1339 created by Alex P. A Hamiltonian cycle or traceable cycle is a path tha...

2 years ago

Solved


Numbers at bit-boundary
Find if a number is on or below the bit-boundary, as defined below. Examples 7,9 straddle the bit-boundary at 2^3 as do 31,32 ...

2 years ago

Solved


That's some divisor you've got there...
Given a positive integer x, calculate the sum of all of the divisors of the number. Please include the number itself in your fi...

2 years ago

Load more