문제를 풀었습니다


Monte-Carlo integration
Write a function that estimates a d-dimensional integral to at least 1% relative precision. Inputs: * d: positive integer....

2개월 전

문제를 풀었습니다


Throwing Dice - Will You Be Eaten By The Dragon?
You and a dragon have agreed to let dice rolls determine whether it eats you or not. The dragon will roll a single die, of x si...

2개월 전

문제를 풀었습니다


find the nth fibonacci number
The Fibonacci sequence is defined as follows: give n, find the nth fibonacci number

2개월 전

문제를 풀었습니다


Vectors counting by 2
Create a vector numbers from 7 to 15 in increments of 2

2개월 전

문제를 풀었습니다


What number has this problem?
This problem is added because it is problem number *???* in the "Community" problems section. <http://www.mathworks.de/matlab...

2개월 전

문제를 풀었습니다


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

2개월 전

문제를 풀었습니다


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

2개월 전

문제를 풀었습니다


Is my wife right? Now with even more wrong husband
Again, as in "Is my wife right?" ( <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right> ), answer 'yes' r...

2개월 전

문제를 풀었습니다


Sum the elements in either diagonal of a square matrix
Sum the elements of a square matrix that lie on either the major diagonal or anti-diagonal. (Include all elements that are part ...

2개월 전

문제를 풀었습니다


ASCii Code
Using matlab, give the symbol that is associated with ASCii code 122

2개월 전

문제를 풀었습니다


Celsius to Fahrenheit converter
Convert Celsius to Fahrenheit degrees.

2개월 전

문제를 풀었습니다


Test for balanced parentheses
Given the input inStr, give the boolean output out indicating whether all the parentheses are balanced. Examples: * If ...

2개월 전

문제를 풀었습니다


surface of a spherical planet
you just discovered its circumference, that is the input.

2개월 전

문제를 풀었습니다


factorial of a number x
Factorial of a number x

2개월 전

문제를 풀었습니다


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

2개월 전

문제를 풀었습니다


Probabilities - Balls and urns - 01
The urn contains B blue balls and R red balls. Each trial consists of drawing one random ball from the urn and observing its col...

2개월 전

문제를 풀었습니다


Probabilities - Balls and urns - 02
The urn contains B blue balls and R red balls. Each trial consists of drawing one random ball from the urn and observing its col...

2개월 전

문제를 풀었습니다


Sums with Excluded Digits
Add all the integers from 1 to n in which the digit m does not appear. m will always be a single digit integer from 0 to 9. no...

2개월 전

문제를 풀었습니다


Sum of diagonals elements of a matrix
Given a matrix, return the sum of all the elements across the diagonals. E.g. A = [1 2 3; 4 5 6; 7 8 9;...

2개월 전

문제를 풀었습니다


Capitilize the first letter of every word in a string
For a given input string, capitalize every letter at the beginning of a word, and transform the rest of the letters to lower-cas...

2개월 전

문제를 풀었습니다


Polynomial evaluation
Compute the value of a polynomial of degree n with coeffcients in vector a, at value x. p(x)=a(1)+a(2)x+a(3)x^2+...+a(n+1)x...

2개월 전

문제를 풀었습니다


Find the diagonal of the square of side L
You are given a square of side length L, find D the length of its diagonal.

2개월 전

문제를 풀었습니다


A shooting competition
In a shooting competition, the target is a square of side L containing a circle of radius R<=L/2. A player scores one point if h...

2개월 전

문제를 풀었습니다


Performance - summation
Given a vector of natural numbers x = [1,2,3,...,N] compute the sum of its elements by not stressing the machine too much...

2개월 전

문제를 풀었습니다


Geometrical meaning of determinant
Given two vectors x,y, in 2D or three vectors x,y,z in 3D space, compute the area (or volume) of the parallelogram they define. ...

2개월 전

문제를 풀었습니다


Area of polygon
Given the vertices in vectors X,Y, return the area of the polygon they define.

2개월 전

문제를 풀었습니다


Find the peak 3n+1 sequence value
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

2개월 전

문제를 풀었습니다


Summing Digits within Text
Given a string with text and digits, add all the numbers together. Examples: Input str = '4 and 20 blackbirds baked in a...

2개월 전

더 보기