解決済み


Insert zeros into vector
Insert zeros after each elements in the vector. Number of zeros is specified as the input parameter. For example: x = [1 ...

約13年 前

解決済み


The Answer to Life, the Universe, and Everything
A variation of a previous Hitchhiker's Guide to the Galaxy problem. *Inputs:* Life, the Universe, and Everything *Output:*...

約13年 前

解決済み


Polynomial division
Divide a polynomial u by polynomial v and return the quotients only. Example: u = x^4+3*x^3+5*x+3 v = x^2+1 Answer: ...

約13年 前

解決済み


Go-style solver
Consider a variation of the game Go where one player has gone ahead and placed several pieces all at once. Assuming that the sec...

約13年 前

解決済み


Return 'on' or 'off'
When the input is true, return 'on', otherwise, return 'off'.

約13年 前

解決済み


Wheat on a chessboard pt 1
If a chessboard were to have wheat placed upon each square such that one grain were placed on the first square and each successi...

約13年 前

解決済み


Wheat on a chessboard pt 2
If a chessboard were to have wheat placed upon each square such that x grains were placed on the first square and each successiv...

約13年 前

解決済み


matrix of natural number
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 resides seially as shown in the examples below. ...

約13年 前

解決済み


matrix zigzag
Unfold a 2-D matrix to a 1-D array in zig-zag order, e.g., for matrix [ 1 2 3 ; 4 5 6 ; 7 8 9 ] the resulting 1-...

約13年 前

解決済み


Sum the Digits of a Number
Given an integer, sum the digits repeatedly until you end up with a single value less than 10. For example, if you add the di...

約13年 前

解決済み


Happy 2013...
Happy 2013, everyone! An interesting tidbit about 2013 is that it is the first year since 1987 to contain four different digits...

約13年 前

解決済み


Coin Tossing: Probability of Same Heads for N tosses
A pair of physicists toss a coin n times each. What is the probability that they tossed the same number of heads? *Input:*...

約13年 前

解決済み


Volume difference between Ellipsoid and Sphere
Given an ellipsoid of semi principal axis (a,b,c) find the volume of the difference between this ellipsoid and the sphere with...

約13年 前

解決済み


Compression: Encode and Decode
This Challenge is to compress an array created by randi(2^32-1,1000) and then decompress your data file. The first call will ...

約13年 前

解決済み


Generate pi using logarithm
Generate pi using logarithm

約13年 前

解決済み


USC Fall 2012 ACM: Rover Maze
This Challenge is to solve Question F, Martian Pits, of the <http://contest.usc.edu/index.php/Fall12/Home USC ACM Fall 2012 Cont...

13年以上 前

解決済み


Create a random logical vector of N elements of which M are true.
Your task for tomorrow is to create a random binary (logical) vector of N elements of which M are true. For example: ran...

13年以上 前

解決済み


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年以上 前

解決済み


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

13年以上 前

解決済み


Crossing to Kissing - Untangle the Lines
Turn lines that cross into lines that kiss. You will be given two lines that cross at some point. Your job is to untangle the...

13年以上 前

解決済み


String permutations on phone keyboard
Given a number such as 2639 return all possible string permutations using the phone-keyboard on <http://www.mathworks.com/matlab...

13年以上 前

解決済み


Find out missing number from a vector of 9 elements
You are given a vector of size 9, x = [x1 x2 x3 x4 x5 x6 x7 x8 x9] Elements of x may be randomly selected without repeati...

13年以上 前

解決済み


Raise Matrix to Power
For a given square matrix x and scalar a, find x^a without using '^' or 'mpower'.

13年以上 前

解決済み


Visualization of experimental data across a surface
Assume that you have taken data across the surface of a sample, for example sheet resistance. The data is stored in a Nx3 matri...

13年以上 前

解決済み


USC Fall 2012 ACM: Driving the Rover
This Challenge is to solve Question E, Driving the Rover, of the <http://contest.usc.edu/index.php/Fall12/Home USC ACM Fall 2012...

13年以上 前

解決済み


USC Fall 2012 ACM: Martian Pranks
This Challenge is to solve Question C, Martian Pranks, of the <http://contest.usc.edu/index.php/Fall12/Home USC ACM Fall 2012 Co...

13年以上 前

解決済み


USC Spring 2012 ACM: Armageddon
This Challenge is to solve Question E, Armageddon, of the <http://contest.usc.edu/index.php/Spring12/Home USC ACM Spring 2012 Co...

13年以上 前

解決済み


USC Fall 2012 ACM : Find Largest Water Concentration
This Challenge is to solve Question B, Water?, of the <http://contest.usc.edu/index.php/Fall12/Home USC ACM Fall 2012 Contest>. ...

13年以上 前

解決済み


I've got the power! (Inspired by Project Euler problem 29)
Consider all integer combinations of a^b and b^a for the integer values 2 ≤ a ≤ 4 and 2 ≤ b ≤ 5: 2^2=4, 2^3=8, 2^4=16,...

13年以上 前

解決済み


Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
If _p_ is the perimeter of a right angle triangle with integral length sides, { _a_, _b_, _c_ }, there are exactly three solutio...

13年以上 前

さらに読み込む