Solved


UICBioE240 2.5
Given a row vector containing all x1, and a column vector containing all x2, and their lengths are equal, create a row vector co...

10 years ago

Solved


UICBioE240 2.9
Find the number of minutes between September X1th 9:15AM to September X2th 2:44PM.

10 years ago

Solved


print date for a given number in date reference is INDIAN calendar,not Christ's Birth.
The Vikram Samvat is said to have been founded by the emperor Vikramaditya of Malwa following his victory over the Sakas in 56 Y...

10 years ago

Solved


Can you reshape the matrix?
Given a matrix A, is it possible to reshape it into another matrix with the given number of rows?

10 years ago

Solved


For a given linear index as input for n sized square matrix, find corresponding row and column.
If input is 1, the row and column will be 1 and 1 respectively.

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

10 years ago

Solved


Get all corner elements from a matrix where dimension of matrix is always equal to or greater than 2.
if a given matrix a = [1 2 3;4 5 6]; so answer is going to be [1 3;4 6]

10 years ago

Solved


Digital Neighbourhood
Given a natural number reorder its digits to create another number, closest to the given one. Examples: * 123 gives 132, ...

10 years ago

Solved


Cody meets Xiangqi: foresee the unseen (Part 1)
This is the first part of the Xiangqi series. The second part in this series is: <http://www.mathworks.com/matlabcentral/cody/pr...

10 years ago

Solved


Longest Collatz Sequence
Inspired by Projet Euler n°14. The Collatz iterative sequence (See Cody problem n° 2103 and 211) is defined for the set of po...

10 years ago

Solved


Return a list sorted by number of consecutive occurrences
Inspired by Problem 38 by Cody Team. Given a vector x, return a vector y of the values in x sorted by the number of CONSECUTIVE...

10 years ago

Solved


longest sequence of nans
In an array return the length of longest sequence of nans for each column. x = [ 2 3 1 2 5 6; nan nan 5 n...

10 years ago

Solved


If you prick us, do we not bleed?
While doing some quick sewing to fix up your child's Halloween costume, you accidentally jab your finger with the needle. Refle...

10 years ago

Solved


Generalized N-Cards Problem
Preface: This is a generalized version of the problem I presented <http://www.mathworks.com/matlabcentral/cody/problems/271-n-ca...

10 years ago

Solved


MATLAB Basic: rounding II
Do rounding nearest integer. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 9

10 years ago

Solved


MATLAB Basic: rounding III
Do rounding towards minus infinity. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 8

10 years ago

Solved


Matrix FUN
Given a Matrix M, find out the number of elements of matrix that are divisible by 3. M = [1 2 3;4 5 6;7 8 9]; ou...

10 years ago

Solved


replace nan values iteratively.
replace nan values with the average of two neighbour non-nan value iteratively as follow; x = [2; 4; 6; nan; nan; nan; 10]; ...

10 years ago

Solved


the number of inputs
Find the number of the inputs of the function. example y = theinputnumber(x,k); function called theinputnumber has 2 in...

10 years ago

Solved


Sum the squares of numbers from 1 to n
For a given value of n return the sum of square of numbers from 1 to n. Example For n = 2 then sum of squares = 5 (1^2 + ...

10 years ago

Solved


sort matrix
Given a matrix, sort it for each column, but cannot change the element of each row. for example input = [1 3; 2 4;1 5;3 6]; ...

10 years ago

Solved


Place numbers
Given two input first input is a matrix which consist of the index numbers of the second input vector. You place the second inpu...

10 years ago

Solved


Add two to x
Create a script such that y equals x plus 2

10 years ago

Solved


Determine if the sum of y is greater than the sum of x.
Given the vector x and the vector y, determine which sum is greater.

10 years ago

Solved


MATLAB Basic: rounding
Do rounding near to zero Example: -8.8, answer -8 +8.1 answer 8

10 years ago

Solved


Convert yards to feet
The goal of this script is to convert a value given in yards to feet.

10 years ago

Solved


Generate the sum of Squares of the given number
|P(n) = 1^2 + 2^2 + ... + n^2| |P(1) = 1| |P(2) = 1 + 4 = 5;| |P(3) = 5 + 9 = 14;| |P(4) = 14 + 16 = 30;|

10 years ago

Solved


become the batman and save gotham!!!
:\\YOU ARE THE BATMAN//: Batman needs your help to save gotham city from its villains! One day while patrolling the streets...

10 years ago

Solved


Test Problem; Create a 5x5 array containing all ones
This is a test for learning the process of creating a Cody problem. The goal of this test problem will be to create an array,...

10 years ago

Solved


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

10 years ago

Load more