Solved


Find the dimensions of a matrix
Just find the number of columns of the given matrix. Example x = [1 2 3 4 5 6] y = 2

10 years ago

Solved


Bit calculation
Give me the count of numbers from 1 to n having their last two bits as 0. For example function y = ret_count(4) y = x...

10 years ago

Solved


Find the square of the sum of the digits of a number
If a number (n) is provided as an input, find the square of the sum of the digits of the number. Example If n = 21, the an...

10 years ago

Solved


Palindrome numbers
Find the palindrome numbers from 1 to n where n is the number entered by the user.

10 years ago

Solved


Palindrome Check
Check whether the entire matrix is palindrome or not. Example matrix = [7 8 7] matrix_reverse = [7 8 7] So the mat...

10 years ago

Solved


What's Your BMI?
Find the body mass index. For reference, please refer to Wikipedia here: <http://en.wikipedia.org/wiki/Body_mass_index body ...

10 years ago

Solved


surrounded matrix
With a given matrix A (size m x n) create a matrix B (size m+2 x n+2) so that the matrix A is surrounded by ones: A = [1 2 ...

10 years ago

Solved


Find out missing number from a vector of 9 elements
You are given a vector of size 9, x = [x1 x2 x3 x4 x5 x6 x7 x8 x9] Elements of x may be randomly selected without repeati...

10 years ago

Solved


Reindex a vector
You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX has integers. Place th...

10 years ago

Solved


High school cafeteria
Given an input vector of positive integers, return a row vector with the primes first (in increasing order) and the composites n...

10 years ago

Solved


Number of toolboxes?
Return a number equal to the number of toolboxes available to the Cody solvers.

10 years ago

Solved


Given a number between 1-365 (a day number in a non leap year) , find what day of what month it is.
For a given number between 1-365 (a day number in a non leap year), you should check which day of which month it is. for exam...

10 years ago

Solved


Back to basics 19 - character types
Covering some basic topics I haven't seen elsewhere on Cody. Return the number of punctuation characters in the input variabl...

10 years ago

Solved


Sales Prediction
Miss X is a shopaholic person and every weekend she goes to a mall. There are total of 10 shops. Miss X starts from shop #1 and ...

10 years ago

Solved


Math Test
Your teacher gave you 15 minutes and 25 problems. In how much time can each Problem be solved, before time flies away? Writ...

10 years ago

Solved


Find supported functions
Given a function name, return true if that function is supported by the toolboxes that are installed with MATLAB on this machine...

10 years ago

Solved


Given a number find two variables
If the input is *x*, find *a* and *b* from the following equation: *x = a*2^b*. Hint: *b* is an integer while *x* and *a* ar...

10 years ago

Solved


Compare two input matrices
Check which input matrix has more elements. Return "1" if matrix A has more elements than matrix B. Otherwise return "0". Exa...

10 years ago

Solved


Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

10 years ago

Solved


Convert Fahrenheit to Celsius
Calculate the Celsius temperature C given the Fahrenheit temperature F. Examples: Input F = 90 Output C is 32.22 I...

10 years ago

Solved


Back to basics - mean of corner elements of a matrix
Calculate the mean of corner elements of a matrix. e.g. a=[1 2 3; 4 5 6; 7 8 9;] Mean = (1+3+7+9)/4 = 5

10 years ago

Solved


Complex transpose
Calculate the transpose of a matrix having complex numbers as its elements without changing the signs of the imaginary part. ...

10 years ago

Solved


Back to basics - array operations
Without performing actual arithmetic operations on arrays, return feasibility of operation as true or false. True if given opera...

10 years ago

Solved


Time Expansion
How can you slow down any discrete-time signal? Example Input original signal x. x = [1 2 3 -1 -2 -5 -4] We want t...

10 years ago

Solved


Broken numlock key, oppps !
The numlock key on my computer is pressed and is now broken, so I cant press it to switch off the numlock mode. And hence I am n...

10 years ago

Solved


Three...is a magic number.
Yes it is... It's a magic number... To help you get rid of that earworm, here's a new Cody problem. You are given a squar...

10 years ago

Solved


"mirror" matrix
Create n x 2n "mirror" matrix of this type: e.g. for n = 2 m = [1 2 2 1;1 2 2 1] e.g. for n = 3 m = [1 2 3 3 2 1...

10 years ago

Solved


Cumulative difference
Given an array, return the cumulative difference. Example a = [ 1 3 5 7 ] cumdiff = [ 1 2 1 -2 ]

10 years ago

Solved


Wayfinding 2 - traversing
This is the second part of a series of assignments about wayfinding. The final goal is to be able to calculate the fastest route...

10 years ago

Solved


Wayfinding 1 - crossing
This is the first part of a series of assignments about wayfinding. The final goal is to be able to calculate the fastest route ...

10 years ago

Load more