문제


Remove multiples of N
in the vector x remove all multiples of N. x = [1 2 3 4 5 6]; N = 2; Then y = [1 3 5];

거의 8년 전 | 1 | 솔버 수: 66

문제를 풀었습니다


Chicken race
2 chickens, Pete and Fred, compete in a 100 meter race. Pete runs at a velocity of vp meter/second and Fred is slower, running ...

거의 8년 전

문제


Chicken race
2 chickens, Pete and Fred, compete in a 100 meter race. Pete runs at a velocity of vp meter/second and Fred is slower, running ...

거의 8년 전 | 0 | 솔버 수: 65

문제를 풀었습니다


time difference
The arrays x and y contain time values in the form of: x = [hours minutes seconds] Create the output z which contains the...

거의 8년 전

문제


time difference
The arrays x and y contain time values in the form of: x = [hours minutes seconds] Create the output z which contains the...

거의 8년 전 | 0 | 솔버 수: 44

문제를 풀었습니다


Count the numbers
In a array x, count the number of times the number n appears in x. for example: x = [1 2 3 4 3 2 1 2] and n = 2 the answer sh...

거의 8년 전

문제


Count the numbers
In a array x, count the number of times the number n appears in x. for example: x = [1 2 3 4 3 2 1 2] and n = 2 the answer sh...

거의 8년 전 | 0 | 솔버 수: 66

문제


Binairy invert
given the unsigned 8-bit integer x, return the number y which is the binary inversion of x. For example if x is 10, y should ...

거의 8년 전 | 2 | 솔버 수: 60

문제


Check capital letters
Check if each first letter of a string is a capital letter. for example: 'This Is Ok' gives a true answer and 'This Is not Ok' ...

거의 8년 전 | 0 | 솔버 수: 39

문제를 풀었습니다


Odd times 3
Given a input matrix x, multiply all odd values by 3. Even values remain the same. example: x = [1 2 3 4 5;... 6 7...

거의 8년 전

문제


Odd times 3
Given a input matrix x, multiply all odd values by 3. Even values remain the same. example: x = [1 2 3 4 5;... 6 7...

거의 8년 전 | 0 | 솔버 수: 67

문제를 풀었습니다


Return the largest number that is adjacent to a zero
This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...

거의 8년 전

문제를 풀었습니다


Which values occur exactly three times?
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...

거의 8년 전

문제를 풀었습니다


Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

거의 8년 전

문제를 풀었습니다


Return the 3n+1 sequence for n
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...

거의 8년 전

문제를 풀었습니다


Find the numeric mean of the prime numbers in a matrix.
There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

거의 8년 전

문제를 풀었습니다


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

거의 8년 전

문제를 풀었습니다


Increment a number, given its digits
Take as input an array of digits (e.g. x = [1 2 3]) and output an array of digits that is that number "incremented" properly, (i...

거의 8년 전

문제를 풀었습니다


Scoring for oriented dominoes
Given a list of ordered pairs, and the order they should be placed in a line, find the sum of the absolute values of the differe...

거의 8년 전

문제를 풀었습니다


Given an unsigned integer x, find the largest y by rearranging the bits in x
Given an unsigned integer x, find the largest y by rearranging the bits in x. Example: Input x = 10 Output y is 12 ...

거의 8년 전

문제를 풀었습니다


Compute total cost
A soda costs 2 dollars. A taco costs 3 dollars. Write a statement that assigns totalCost with the total meal cost given the numb...

거의 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년 전

문제를 풀었습니다


Assigning a sum
* Write a statement that assigns numCoins with numNickels + numDimes.

거의 8년 전

문제를 풀었습니다


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

거의 8년 전

문제를 풀었습니다


Extract leading non-zero digit
<http://en.wikipedia.org/wiki/Benford%27s_law Benford's Law> states that the distribution of leading digits is not random. This...

거의 8년 전

문제를 풀었습니다


Check if number exists in vector
Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

거의 8년 전

문제를 풀었습니다


Return the first and last character of a string
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

거의 8년 전

문제를 풀었습니다


Make one big string out of two smaller strings
If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

거의 8년 전

문제를 풀었습니다


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

거의 8년 전

문제를 풀었습니다


Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

거의 8년 전

더 보기