Solved


Divisible by 3
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

9 years ago

Solved


Divisible by 2
This is the first problem in a set of "divisible by x" problems. You will be provided a number as a string and the function you ...

9 years ago

Solved


Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false. ...

9 years ago

Solved


Average valid values of arrays
Given a 1D array (column or row vector), compute the average of valid values. Valid values are defined via two thresholds: minVa...

9 years ago

Solved


Square a Number
Given an input x, return y, which is equal to the square of x.

9 years ago

Solved


Min by mean
Substitute the minimum value in each row of a matrix A by the mean of that row (it should also work if the input is a vector)

9 years ago

Solved


With apologies to William Blake
Coder Coder, typing fast Sitting at your desk, aghast. What immortal MATLAB script will solve this problem, nice and qu...

9 years ago

Solved


GJam 2015 Rd1B: Counter Culture
This Challenge is derived from <https://code.google.com/codejam/contest/8224486/dashboard#s=p0 GJam 2015 Rd 1B: Counter Culture>...

9 years ago

Solved


GJam 2015 Rd1B: Noisy Neighbors
This Challenge is derived from <https://code.google.com/codejam/contest/8224486/dashboard#s=p1 GJam 2015 Rd 1B: Noisy Neighbors>...

9 years ago

Solved


A quadrant matrix
Write a function called quadrants that takes as its input argument a scalar integer named n. The function returns Q, a 2n-by-2n ...

9 years ago

Solved


Write a function man that takes a row vector v and returns a matrix H as follows..
Write a function called man that takes a row vector v as an input and returns a matrix H whose first column consist of the eleme...

9 years ago

Solved


Evened up (or not)
You will be provided with an array or matrix that contains various numbers, in addition to an evening variable, e, set to 1 or 0...

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

9 years ago

Solved


Repeat The Components of Matrix
Repeat The components of a matrix so that the size of the output matrix is double to input matrix and components are repeated ne...

9 years ago

Solved


Calculate square and cube of number
Calculate square and cube of number x

9 years ago

Solved


factorial of a number x
Factorial of a number x

9 years ago

Solved


Determine if a row vector has NaN
Determine if a row vector x has NaN

9 years ago

Solved


Return fibonacci sequence do not use loop and condition version 3
Calculate the nth Fibonacci number,return sequence Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... ...

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

9 years ago

Solved


Calendar Matrix
Return a calendar matrix for the given values of month and year. Assume that Sunday is the first day of the week. The resulting ...

9 years ago

Solved


Numbers spiral diagonals (Part 2)
Inspired by Project Euler n°28 and 58. A n x n spiral matrix is obtained by starting with the number 1 and moving to the righ...

9 years ago

Solved


Numbers spiral diagonals (Part 1)
Inspired by Project Euler n°28 et 58. A n x n spiral matrix is obtained by starting with the number 1 and moving to the right...

9 years ago

Solved


Replace Nonzero Numbers with 1
Given the matrix x, return the matrix y with non zero elements replaced with 1. Example: Input x = [ 1 2 0 0 0 ...

9 years ago

Solved


summation of the reciprocals
Determine the summation of the reciprocals of numbers with length equal to N,in the meanwhile there is a digit K excluded from t...

9 years ago

Solved


Rotate counterclockwise a matrix 90 deg with left-bottom element
Example: Input [ 1 2 3 4 5 6 ] Output [ 3 6 2 5 1 4 ]

9 years ago

Solved


Matrix Construction I
Given n, construct a matrix as shown in the example below. Example For n=8, the output should look like this: 1 2 3 4 ...

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

9 years ago

Solved


(Linear) Recurrence Equations - Generalised Fibonacci-like sequences
This problem is inspired by problems <http://uk.mathworks.com/matlabcentral/cody/problems/2187-generalized-fibonacci 2187>, <htt...

9 years ago

Solved


Gold Standard
Gold has long been used as currency and a standard for currency, due to its inherent value and rarity. Historical data for gold ...

9 years ago

Solved


Sum of odd numbers in a matrix
Find the sum of all the odd numbers in a matrix. Example x = [2 3 5 7 1 4 11] y = 27

9 years ago

Load more