已解决


MatCAT - Reconstruct X from Its X-rays
Consider a matrix x x = [ 1 2 0 0 5 0 3 0 8 ] If we sum x along the rows we get row_sums = [3 5 11] ...

13 years 前

问题


Unique dice configurations
Given a number of dice N and the number of sides on each die S, write a MATLAB function that will output how many unique permuta...

13 years 前 | 3 | 36 个解题者

已解决


Unique dice configurations
Given a number of dice N and the number of sides on each die S, write a MATLAB function that will output how many unique permuta...

13 years 前

已解决


Find smallest integer type to accommodate your number
MATLAB supports 1-, 2-, 4-, and 8-byte storage for integer data. Find the smallest integer type to accomodate a scalar integer. ...

13 years 前

已解决


Ackermann's Function
Ackermann's Function is a recursive function that is not 'primitive recursive.' <http://en.wikipedia.org/wiki/Ackermann_fun...

13 years 前

已解决


RISK board game battle simulation
Given two positive integer inputs, a (attacker army units) and d (defender army units) return the probablity of victory (from 0....

13 years 前

问题


Points on a Sphere
Given a sphere of radius R, determine how many points on the surface of that sphere have three integer coordinates. Do not outp...

13 years 前 | 4 | 27 个解题者

已解决


Points on a Sphere
Given a sphere of radius R, determine how many points on the surface of that sphere have three integer coordinates. Do not outp...

13 years 前

已解决


Calculate euler's phi function
Compute the euler's phi function of a large integer. For more information about this topic please visit: <https://en.wikiped...

13 years 前

已解决


Covering area
As an extension of the problem <http://www.mathworks.com/matlabcentral/cody/problems/416-polygon-area>, find the area, bounded b...

13 years 前

已解决


Fun Race
* Given two unary functions foo and goo. * Check whether foo(0) runs faster than goo(0). * Output 1 if foo is faster, otherwis...

13 years 前

已解决


Property dispute!
Two neighbors have rectangular plots of land A and B. The surveyors give you the coordinates of each. If they overlap, there is ...

13 years 前

已解决


Accurate Division
Given three integers x, y and d, return x/y (as a string) to d significant digits. Remove leading and trailing zeros. Example...

13 years 前

已解决


How many days does the cat take to climb out of the hole?
A cat accidentally falls down a hole with sloping but rough sides. It can climb out of the hole of height h metres, but for ever...

13 years 前

已解决


Find the nearest integer
Given a vector of integers and a real number find the closest integer. EX: >> a = [2 4 5 6 8 10]; >> b = 4.6; >> nea...

13 years 前

已解决


THE CALCULATOR OF LOVE
In honor of Valentine's Day, program a love calculator that figures out the percentage of compatibility between two people using...

13 years 前

已解决


Elastic Collision 001: 1-D
Elastic Collision of two particles. <http://en.wikipedia.org/wiki/Elastic_collision wiki Elastic Collision> Solve Conservat...

13 years 前

已解决


Fermat's Last Theorem - Fermat's conjecture
Fermat's Last Theorem (sometimes called Fermat's conjecture, especially in older texts) states that no three positive integers a...

13 years 前

已解决


Penny flipping - calculate winning probability (easy)
Two players are playing a fair penny flipping game. For each flip, the winner adds one penny from the loser's collection to his/...

13 years 前

已解决


Find the list of all open files
In the test suite, I use <http://www.mathworks.com/help/matlab/ref/fopen.html fopen> to create new files. The task is to find th...

13 years 前

已解决


Max index of 3D array
Given a three dimensional array M(m,n,p) write a code that finds the three coordinates x,y,z of the Maximum value. Example ...

14 years 前

已解决


Center of mass
Given a matrix M(m,n), where m is the number of vertices of the geometrical element and n is 2 or 3 (2D-plane figure or 3D-solid...

14 years 前

已解决


Calculate the probability that at least two people in a group share the same birthday.
Calculate the probability that at least two people in a group share the same birthday. Given an integer input n, return to 0.015...

14 years 前

已解决


It's race time again! Write a function that is at least twice as fast as the test suite call of repmat().
Given an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x. This must be done in l...

14 years 前

已解决


Convert elements in numeric array into different class
Write a function that converts elements in a numeric array into a different class. Example: a = [1:5]; % class: double b...

14 years 前

已解决


Create matrix of replicated elements
Given an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x. Example: Input: ...

14 years 前

已解决


Infinite precision division
Develop a function that will divide a very very large integer numerator, supplied to function as a string (e.g., '12233344445555...

14 years 前

已解决


first step for Huffman Coding (easy)
Given a string, you must sort the characters by occurrence (from lowest to highest). This step is necessary to generate a Huf...

14 years 前

已解决


When can one be the Life Member of the IEEE?
Consult the site http://en.wikipedia.org/wiki/Ieee from where it can be seen that IEEE Members who have reached the age of 65 an...

14 years 前

已解决


Overwrite/Re-defination PROBLEM
>> M = magic(3) M = 8 1 6 3 5 7 4 9 2 >> result = -det(M) result = 36...

14 years 前

加载更多