解決済み


Babylonian method
Calculate the square root of a given positive number a using the Babylonian method (https://en.wikipedia.org/wiki/Methods_of_co...

10年以上 前

解決済み


jumping astronauts
The surface gravity on the moon is approximately 2 m/s^2. Thats why an funny astronauts feels as light as a feather and jumps fr...

10年以上 前

解決済み


Juggler sequence revisited
This problem is related to <http://www.mathworks.com/matlabcentral/cody/problems/42835-return-the-sequence-element-ii Problem 42...

10年以上 前

解決済み


Return the sequence element II
Given positive integers x and n, return a positive integer, y, which is the nth term in the <https://en.wikipedia.org/wiki/Juggl...

10年以上 前

解決済み


Polygon division
Given the number of vertices (or sides), n, of a planar convex polygon, return the number of ways, w, in which you can divide th...

10年以上 前

解決済み


attenuation
A beam of X-rays propagates a length d(1) through a medium with an attenuation coefficient alpha(1). After that the beam propaga...

10年以上 前

解決済み


Return the sequence element
Given a positive integer, x, return a positive integer, y, which is the nth term in the sequence [1 2 2 3 3 3...], in which one ...

10年以上 前

解決済み


Number construction I
Given a positive integer, n, return a, b, c and d, such that 1. n = a*sqrt(b)+c*sqrt(d) 2. a, b, c and d are all positive ...

10年以上 前

解決済み


center of mass
R is a given matrix with size [n,2]. R(i,:) is interpreted as the 2D-position of a mass point with mass i. Calculate the center ...

10年以上 前

解決済み


Sorting integers by their digits (Level 2)
This is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/42809-sorting-integers-by-their-digits Probl...

10年以上 前

解決済み


Sorting integers by their digits (Level 1)
Given a vector, v, of positive integers, return a vector, w, by sorting v in ascending order, such that primary sorting is done ...

10年以上 前

解決済み


Britney Unfolded
You have a long, narrow strip of paper. You are going to fold this strip of paper length-wise in half, than fold the folded stri...

10年以上 前

解決済み


Approximate e
Given a and n, compute and approximation to f = a * e ^ n, without the use of exp, string operations, or floating point numbers....

10年以上 前

解決済み


Sum of Logarithms
Given a vector, v, of real positive numbers, compute the sum, s, of the base-10 logarithms of the elements of v, without the use...

10年以上 前

解決済み


Rolling maximums above a threshold
You are given either a vector or a 2-D matrix M and a threshold value of t. Write a script that will calculate how many times t...

10年以上 前

問題


Rolling maximums above a threshold
You are given either a vector or a 2-D matrix M and a threshold value of t. Write a script that will calculate how many times t...

10年以上 前 | 1 | 33 個のソルバー

解決済み


house of cards
How many cards do one need to build a house of cards with n stages? Short explanation: /\ 2 cards for 1 stage ...

10年以上 前

解決済み


Find the path through the cell
A list of cells is given. Return true if the elements of the list increase monotonically (each element is strictly larger tha...

10年以上 前

解決済み


Fill the Matrix - 2
Input is a column vector and n. n columns will be added to the left of the input column. The first value of the row is the me...

10年以上 前

解決済み


Convert from integer to binary
if true % decimalToBinaryVector(x) end

10年以上 前

解決済み


MATLAB Prison: Absolute Cruelty
The warden of MATLAB prison is particularly cruel. Space is in short supply (too many criminals with bad grammar, no examples an...

10年以上 前

解決済み


While loop with multiple conditions
Write a while loop that multiplies userValue by 2 while userValue is not 10 and while userValue is less than 25.

10年以上 前

解決済み


Fast 1-D Convolution (full shape)
This is the first problem in the <http://www.mathworks.com/matlabcentral/cody/?term=Fast+1-D+Convolution fast 1-D convolution se...

10年以上 前

解決済み


MATLAB Prison: Summing light bulbs
On one wall in the MATLAB prison there is a row of n numbered light bulbs. Each bulb is controlled by a switch. Every morning, n...

10年以上 前

解決済み


Number of divisors of a given number
Given a Number n, return the number of his divisors without listing them example: n=14 ; Divisors={1,7,2,14} ; y=4 n=...

10年以上 前

解決済み


How many ways to write a number
Given two positive numbers n and k, where n>=k. In how many ways can we write n as sum of k positive numbers. Same numbers but d...

10年以上 前

解決済み


Rearrange string
Input is a given string. Output is the number of ways to rearrange the string.

10年以上 前

解決済み


Choose group with people
How many ways can you choose n groups of n people from n^2 people, assuming the groups are distinct? The number of people i...

10年以上 前

解決済み


Regular polygon bounded by and bounding a circle
As the number of sides (or vertices) of a regular polygon goes to infinity, its perimeter and area go to the perimeter and area ...

10年以上 前

解決済み


Number of pennies
Complete the function ConvertToPennies() so that the function returns the total number of pennies given a number of dollars and ...

10年以上 前

さらに読み込む