Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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)

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


factorial of a number x
Factorial of a number x

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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 ]

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Mehr laden