
Theo
Followers: 0 Following: 0
Feeds
문제를 풀었습니다
Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Input...
7일 전
문제를 풀었습니다
Back and Forth Rows
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...
7일 전
문제를 풀었습니다
Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...
7일 전
문제를 풀었습니다
Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Example...
7일 전
문제를 풀었습니다
Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displayed ...
7일 전
문제를 풀었습니다
Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; ...
7일 전
문제를 풀었습니다
Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...
7일 전
문제를 풀었습니다
Construct a string from letters and counts
Given two input arrays like this: [5,3,1] ['a','b','c'] Output a string that contains each letter the specified num...
8일 전
문제를 풀었습니다
collision
several cars (n) were involved in this collision, the input matrix (vm) has n rows and two columns, first column for velocity an...
8일 전
문제를 풀었습니다
wait for me
wait exactly x seconds please, need not be more than 2 seconds but must be accurate within say 50 milliseconds, your function mu...
8일 전
문제를 풀었습니다
Angle of triangle
For three unknown points a b c, given three sides ab bc ca, find three angles abc bca cab in radians. Your function should be a...
8일 전
문제를 풀었습니다
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...
8일 전
문제를 풀었습니다
DC chopper
Input x is the sampled signal vector, may have both AC and DC components. output vector y should have AC components removed then...
8일 전
문제를 풀었습니다
Program an exclusive OR operation with logical operators
Program an exclusive or operation *without* using the MATLAB function xor. Use logical operators like |, &, ~, ... instead. ...
8일 전
문제를 풀었습니다
does it touch ?
given a sentence, tell how much it touches. input : string output : how much it touches touching : a bilabial phoneme d...
8일 전
문제를 풀었습니다
Which quadrant?
Given a complex number, output quadrant 'I' 'II' 'III' or 'IV' | II | I | ...
8일 전
문제를 풀었습니다
So many choices
For inputs _n_ and _k_ (in that order), output the number of ways that k objects can be chosen from amongst n distinct objects. ...
8일 전
문제를 풀었습니다
newRMS
find root mean square of a signal x in less time than the test code and accurate to six places.
8일 전
문제를 풀었습니다
Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...
8일 전
문제를 풀었습니다
surface of a spherical planet
you just discovered its circumference, that is the input.
8일 전
문제를 풀었습니다
Filter AC, pass DC
Input x is the sampled signal vector, may have both AC and DC components. Output vector y should not contain any AC component. ...
8일 전
문제를 풀었습니다
Omit columns averages from a matrix
Omit columns averages from a matrix. For example: A = 16 2 3 13 5 11 10 8 9 7 ...
8일 전
문제를 풀었습니다
First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];
8일 전
문제를 풀었습니다
Pizza!
Given a circular pizza with radius z and thickness a, return the pizza's volume. [ z is first input argument.] Non-scored bonus...
8일 전
문제를 풀었습니다
High school cafeteria
Given an input vector of positive integers, return a row vector with the primes first (in increasing order) and the composites n...
8일 전
문제를 풀었습니다
The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".
8일 전
문제를 풀었습니다
All your base are belong to us
Find the base _b_ logarithm of the input decimal number _x_. Express the output as a decimal number. The first argument is the n...
8일 전
문제를 풀었습니다
Cannon Ball
Given g (acceleration due to gravity) and desired altitude x, find the minimum ground velocity of a cannon ball to reach x.
8일 전