Solved


Given a matrix A (size m x n) create a matrix B (size m+2 x n+2) which consists of matrix A surrounded by zeros. See Example below:
A = [1 2 3 4 5 6] ----------- B = [0 0 0 0 0 0 1 2 3 0 0 4 5 6 0 0 0 0 0 0]

7 years ago

Solved


Given a Vector v1, create v2 which is the sum of each two adjacent elements in v1. {length(v2)=length(v1)-1}
if v1 is [1 2 3 4 5 6 7 8] then v2 should be [3 5 7 9 11 13 15]. if v1 is [1; 3; 5; 7] the...

7 years ago

Solved


twins or duplicate
You have to find if someone is present in 2 lists even if there's one orthographic fault in his name. Consider that an orthogr...

7 years ago

Solved


Opposite point of the earth, what is the antipodal of a point ?
Given two strings(lat and long) that represent the geographic coordinates of a point in the earth, you have to find out what is ...

7 years ago

Solved


Index of neighbor pixel with steepest gradient
Unlike in various applications, where the gradient of a two dimensional matrix is calculated in x and y direction, the gradient ...

7 years ago

Solved


Path of least resistance - Move all direction
Extension of the wonderful <https://www.mathworks.com/matlabcentral/cody/problems/1049-path-of-least-resistance Problem 1049> (P...

7 years ago

Solved


Two functions (to be sure)
I want to compute the number of odd/even numbers in an array. But I want the results by two different functions. Example: ...

7 years ago

Solved


Cody Computer Part 5 - Guess the Name of Cody Computer
Network computers have generally a nickname to be identified. Can you guess the nickname of the Cody Computer? No inpu...

7 years ago

Solved


Ratio between sum of primes and sum of factors
Write a function that calculates the ratio between the sum of primes numbers lower or equal to x, and the sum of the factors of ...

7 years ago

Solved


Get the mean digit
Write a function that gives the mean digit (round towards nearest integer) of an input and positive number. For example: x ...

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

7 years ago

Solved


Rate of event occurence: find percentiles of the distribution (for smallish rates)
*In this problem you need to find the 5th and 95th percentiles of a Poisson distribution defined by parameter _μ_ (the mean rate...

7 years ago

Solved


Get factory-defined property values
Given a property name (e.g. 'AxesUnits', 'LineMarkerSize', 'UicontrolBackgroundColor'), return the factory-defined value for tha...

7 years ago

Solved


Get Cody's screen size
Return an object that helps this problem's test suite return Cody's screen size.

7 years ago

Solved


CowBoy
A group of cowboys standing in circle form. They have one gun. The first cowboy shoot the cowboy beside him (second one) and giv...

7 years ago

Solved


Tautology
Check if the given expression is always true. For example, the sentence '~(A & B) == (~A | ~B)' is always true. Chara...

7 years ago

Solved


RPN Calculator for simple arithmetic expressions
Reverse-Polish-Notation (RPN) is a machine friendly form of calculating expressions. Example, to evaluate, (1+2)*4 + 5 - 3 you ...

7 years ago

Solved


USC Fall 2012 ACM Question A : Read Input File
This Challenge is to read the Question A input text file of the <http://contest.usc.edu/index.php/Fall12/Home USC ACM Fall 2012 ...

7 years ago

Solved


Hungry Snake
Who hasn't played <http://en.wikipedia.org/wiki/Snake_%28video_game%29 the Snake game> when they were little? It's quite hard ...

7 years ago

Solved


Angle between two vectors
Given 2 pairs of _cartesian co-ordinates_, determine the angle between the 2 vectors formed by the _points_ and the _origin_. An...

7 years ago

Solved


Remove Missing Values from a Table or an Array
Remove missing entries from an array or table. If A is a vector, then remove any entry that contains missing data. If A is a mat...

7 years ago

Solved


USC Spring 2013 ACM: Snow Cones
This Challenge is to solve the <http://contest.usc.edu/index.php/Spring13/Home USC Spring 2013 ACM Contest> Problem F, Snow Cone...

7 years ago

Solved


Segmented number sequence
Given a positive integer, n, and a row vector, x, of positive integers, return a row vector, v, which is a sequence of length n ...

7 years ago

Solved


Would Homer Like It?
Given a matrix of ones and zeros, you must determine if there are any doughnuts present (would Homer Simpson like it?). A doughn...

7 years ago

Solved


The almost-birthday problem.
This is a harder version of the birthday problem. Now, you will have to determine the probability that two or more people in a r...

7 years ago

Solved


Free Fall analytical solution (Chapra 2012 textbook Example 1.1)
Analytical solution to bungee jumper problem. Given time series as a vector, parameters mass and drag coefficient, and gravit...

7 years ago

Solved


Fast 1-D Convolution (valid shape)
Pursuant to the first problem in the <http://www.mathworks.com/matlabcentral/cody/?term=Fast+1-D+Convolution fast 1-D convolutio...

7 years ago

Solved


Fast 1-D Convolution (full shape)
This is the first problem in the <http://www.mathworks.com/matlabcentral/cody/?term=Fast+1-D+Convolution fast 1-D convolution se...

7 years ago

Solved


Fast 1-D Convolution (same shape)
Pursuant to the first problem in the <http://www.mathworks.com/matlabcentral/cody/?term=Fast+1-D+Convolution fast 1-D convolutio...

7 years ago

Solved


Send vector into a struct object
Construct a struct object that contains n fields named a1, a2, ..., an, and has values from a given input vector of length n.

7 years ago

Load more