已解决


Kaprekar numbers
Test if the input is a Kaprekar number: <http://mathworld.wolfram.com/KaprekarNumber.html>. Return a logical true or false. ...

13 years 前

已解决


First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero ...

13 years 前

已解决


collision
several cars (n) were involved in this collision, the input matrix (vm) has n rows and two columns, first column for velocity an...

13 years 前

已解决


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

13 years 前

已解决


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

13 years 前

已解决


peta to nano (x-ray)
for certain x-ray radiation, given frequency in petahertz, give wavelength in nanometer, must be accurate +/- 25%

13 years 前

已解决


Remove white space from the string
Remove the white spaces (trailing and leading) from the input variable

13 years 前

已解决


Generate N equally spaced intervals between -L and L
Given N and L, return a list of numbers (in ascending order) that divides the interval [-L L] into N equal-length segments. F...

13 years 前

已解决


Better bullseye matrix
<http://www.mathworks.com/matlabcentral/cody/problems/18-bullseye-matrix Problem 18> asks to create a bullseye matrix like this:...

13 years 前

已解决


Hamming Weight - Size Scoring
The Hamming Weight, <http://en.wikipedia.org/wiki/Hamming_weight wiki Hamming Weight>, in its most simple form is the number of ...

13 years 前

已解决


Find the "ordinary" or Euclidean distance between A and Z
A, B and Z define three points in the 3D _Euclidean_ space of the form: A = [x1;y1;0]; B = [x2;y2;0]; Z = [x2;y2;z]; Find th...

13 years 前

已解决


Handle to an array of functions
Given a cell array of functions that operate on scalars, it is required to return a function handle to process a vector of value...

13 years 前

已解决


Function composition
Write a function that accepts two function handles f and g and returns the composition h. That is, h = (f o g)(x) = f(g(x)) ...

13 years 前

已解决


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

13 years 前

已解决


Getting the absolute index from a matrix
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to get the <http://www.ma...

13 years 前

已解决


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

13 years 前

已解决


Getting the row and column location from a matrix
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to get <http://www.mathwo...

13 years 前

已解决


Steal, Share, or Catch
You, I, and a few other characters are going to play a game of *Steal, Share or Catch*. We are going to play it 10,000 times vs...

13 years 前

已解决


Circumscribed circles
Given the lengths of the 3 sides of a triangle, output the radius of the circumscribed circle. Example: [3 4 5] -> 2.5

13 years 前

问题


Numerical Integration
Input * |x0|, a real number greater than 0 Output * |I|, a numerical estimate of the integral x0 / I...

13 years 前 | 1 | 90 个解题者

已解决


Numerical Integration
Input * |x0|, a real number greater than 0 Output * |I|, a numerical estimate of the integral x0 / I...

13 years 前

已解决


Knave in the middle attack
This is a Matlab adaptation of the <http://en.wikipedia.org/wiki/Knights_and_Knaves Knives and Knaves> logical puzzles, mixed wi...

13 years 前

已解决


Woodall number
Test whether the input is a Woodall number: <http://en.wikipedia.org/wiki/Woodall_number> _Please do not cheat by simply chec...

13 years 前

已解决


Knights and Knaves (part 3)
_This is a Matlab adaptation of the_ <http://en.wikipedia.org/wiki/Knights_and_Knaves Knives and Knaves> _logical puzzles_. ...

13 years 前

已解决


Knights and Knaves (part 2)
_This is a Matlab adaptation of the_ <http://en.wikipedia.org/wiki/Knights_and_Knaves Knives and Knaves> _logical puzzles_. ...

13 years 前

已解决


Knights and Knaves (part 1)
This is a Matlab adaptation of the <http://en.wikipedia.org/wiki/Knights_and_Knaves Knights and Knaves> logical puzzles. You ...

13 years 前

已解决


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

13 years 前

已解决


Say something funny
Say something funny, or not. Your solution will be (fully automatically and objectively) scored based on how clever or funny ...

13 years 前

已解决


Return the Fibonacci Sequence
Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...

13 years 前

已解决


Tricky timing
Write a function that takes between 0.5 seconds and 0.6 seconds to run.

13 years 前

加载更多