Feeds
문제를 풀었습니다
Approximation of Pi
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given number of...
1년 초과 전
문제를 풀었습니다
Pi Estimate 1
Estimate Pi as described in the following link: <http://www.people.virginia.edu/~teh1m/cody/Pi_estimation1.pdf>
1년 초과 전
문제를 풀었습니다
Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...
1년 초과 전
문제를 풀었습니다
Perimeter of a semicircle
Given the diameter d, find the perimeter of a semicircle
1년 초과 전
문제를 풀었습니다
Given a square and a circle, please decide whether the square covers more area.
You know the side of a square and the diameter of a circle, please decide whether the square covers more area.
1년 초과 전
문제를 풀었습니다
Project Euler: Problem 2, Sum of even Fibonacci
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te...
대략 11년 전
문제를 풀었습니다
Output any real number that is neither positive nor negative
Output any real number that is neither positive nor negative
대략 11년 전
문제를 풀었습니다
Check to see if a Sudoku Puzzle is Solved
*Description:* Your task, should you choose to accept it, is to make a function that checks to see if a 9x9 matrix of integer...
대략 11년 전
문제를 풀었습니다
Find the largest value in the 3D matrix
Given a 3D matrix, A, find the largest value. E.g. >> A = 1:9; >> A=reshape(A,[3 1 3]); >> islargest(A) ans = 9
대략 11년 전
문제를 풀었습니다
Number of 1s in a binary string
Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...
대략 11년 전
문제를 풀었습니다
give nth decimal place of pi
max 15th place after the decimal point is ok for now
대략 11년 전
문제를 풀었습니다
Stuff the Board
You have a stack of tiles to put onto an array-like playing board. Each tile has a number (always an integer), and the board var...
대략 11년 전
문제를 풀었습니다
Solitaire Cipher
Implement the <http://en.wikipedia.org/wiki/Solitaire_(cipher) solitaire cipher>. Since this is from Wikipedia, I am capturin...
대략 11년 전
문제를 풀었습니다
How long is the longest prime diagonal?
Stanislaw Ulam once observed that if the counting numbers are <http://en.wikipedia.org/wiki/Ulam_spiral arranged in a spiral>, t...
대략 11년 전
문제를 풀었습니다
Multiply 2 numbers
Very easy, you just have to multiply 2 numbers but you cannot use the following signs (*, /, - ,^) ,mtimes , times, cross, pro...
대략 11년 전
문제를 풀었습니다
vectorization in N
For a given integer n (n>1), compute the sum f (i) (1 <= i <= n) where f (i) = 1 if n is odd and 2 otherwise.
대략 11년 전
문제를 풀었습니다
02 - Vector Variables 2
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2b.png>>
대략 11년 전
문제를 풀었습니다
Given a 4x4 matrix, swap the two middle columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...
대략 11년 전
문제를 풀었습니다
Number of digits in an integer
Specifies how many digits in a given integer. Example: in=100 ==> out=3
대략 11년 전
문제를 풀었습니다
Geometric series
Find the sum, given the first term t1, the common ratio r, and number of terms n. Examples If input t1=1, r=1, n=7 the...
대략 11년 전
문제를 풀었습니다
01 - Scalar variables
Create the following variables: <<http://samle.dk/STTBDP/Assignment1_1.png>>
대략 11년 전
문제를 풀었습니다
Count up then down
Create a function that produces counting up from 0 up to n then down to 0 n=2 --> 0 1 2 1 0 n=3 --> ...
대략 11년 전
문제를 풀었습니다
No Twins?
Write a function that accepts as input a vector and returns the same vector, but retaining only the first occurrence of an eleme...
대략 11년 전
문제를 풀었습니다
Return 'on' or 'off'
When the input is true, return 'on', otherwise, return 'off'.
대략 11년 전





