已解决


Create an array (n,n) where only diagonal elements are '1' and others are '0'
Create an array (n,n) where only diagonal elements are '1' and others are '0' EX: n = 3; then Resultant array would be [ 1 0...

11 years 前

已解决


Define the operators of function_handles
Suppose f and g are function_handles, try to define f+g,f-g,f*g and f/g. e.g. if f = @(x)x and g = @(x)x+1 ...

11 years 前

已解决


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

11 years 前

已解决


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

11 years 前

已解决


Code Wheel
Create a function that offsets each value in a given string by a given amount. For instance, codewheel('hello',1) s...

11 years 前

已解决


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

11 years 前

已解决


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

11 years 前

已解决


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

11 years 前

已解决


It's going down. We're finding simbers!
This problem is inspired by Project Euler 520: Simbers. "We define a simber to be a positive integer in which any odd digit, ...

11 years 前

已解决


Combined Ages 2 - Symmetric, n ≥ 3
Following on <http://www.mathworks.com/matlabcentral/cody/problems/42382-combined-ages-1-symmetric-n-3 Combined Ages 2>, you wil...

11 years 前

已解决


Combined Ages 3 - Non-symmetric, n ≥ 3
Pursuant to the previous two problems ( <http://www.mathworks.com/matlabcentral/cody/problems/42382-combined-ages-1-symmetric-n-...

11 years 前

已解决


Combined Ages 1 - Symmetric, n = 3
You have probably seen the common riddle wherein combined ages are provided and you must determine the individual ages. For exam...

11 years 前

已解决


Faint Receipt
Suppose you have a receipt with some numbers that have been smudged or didn't print. In particular, the total amount is missing ...

11 years 前

已解决


Bouncy numbers
Inspired by Project Euler n°112. * * Working from left-to-right if no digit is exceeded by the digit to its left it is call...

11 years 前

已解决


Look and say Conway's sequence
In mathematics, the look-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, 312211, ...

11 years 前

已解决


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

11 years 前

已解决


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

11 years 前

已解决


How close to a hole
Suppose you have a description of good places (ones) and bad places (zeros). You want to know your distance from a bad place (in...

11 years 前

已解决


~(*|/)
Return three quarters of n without using addition, subtraction, multiplication or division.

11 years 前

已解决


Fibonacci Decomposition
Every positive integer has a unique decomposition into nonconsecutive Fibonacci numbers f1+f2+ ... Given a positive integer n, r...

11 years 前

已解决


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

11 years 前

已解决


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

11 years 前

已解决


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

11 years 前

已解决


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

11 years 前

已解决


Kinetic Energy
Given the mass m and velocity v of an object, determine its <http://en.wikipedia.org/wiki/Kinetic_energy kinetic energy>.

11 years 前

已解决


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

11 years 前

已解决


Alternating sum
Given vector x, calculate the alternating sum y = x(1) - x(2) + x(3) - x(4) + ...

11 years 前

已解决


Don't Try, give up and return NaN.
This is another version of <http://www.mathworks.com/matlabcentral/cody/problems/3107-try-and-catch-simple-example problem 3107....

11 years 前

已解决


Find out Harmonic mean.
Find out Harmonic mean.

11 years 前

已解决


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

11 years 前

加载更多