문제를 풀었습니다


Binary
Given a positive, integer n, create a function that returns the respective binary number in the form of a vector. Example: ...

7년 초과 전

문제를 풀었습니다


Bit Reversal
Given an unsigned integer _x_, convert it to binary with _n_ bits, reverse the order of the bits, and convert it back to an inte...

7년 초과 전

문제를 풀었습니다


Calculate the height of an object dropped from the sky
Assume that an object is dropped from 1000 meters above the surface of the earth at time t=0. The object is dropped such that t...

7년 초과 전

문제를 풀었습니다


Array of Ones
Create a 100 X 100 array of ones.

7년 초과 전

문제를 풀었습니다


Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.

7년 초과 전

문제를 풀었습니다


How many monitors are connected ?
How to obtain the numbers of monitors connected to your computer ?

7년 초과 전

문제를 풀었습니다


Matlab Basics II - Minimum
Write a function that returns the minimum of each ROW of a matrix x example: x = [1 2 3; 4 5 6]; output [1;4];

7년 초과 전

문제를 풀었습니다


Create an 'arrow-head" matrix
Write a function that when given an odd number, produces an arrow-head function pointing to the right. Examples n = 3 ...

7년 초과 전

문제를 풀었습니다


Next Higher Power of B
|Given a number _n_ and a base _B_ greater than 1, return the lowest integer power of _B_ that is greater than or equal to _n_. ...

7년 초과 전

문제를 풀었습니다


Travel speed
Write an anonymous function to compute the Euclidean distance given two points (x1, y1) and (x2, y2). Use the following equation...

7년 초과 전

문제를 풀었습니다


Prime checker
Complete the recursive function to determine if a number is prime. Skeletal code is provided in the PrimeChecker function.

7년 초과 전

문제를 풀었습니다


Calculate distance travelled when given radius and rotations
When given radius of wheel and number of rotations calculate total distance travelled consider pi=3.14

7년 초과 전

문제를 풀었습니다


Matlab Basics II - Intervals
Write a function that takes an interval from a to b, and divides it into 5 parts example: a = 1, b = 2 output = 1 1.25 ...

7년 초과 전

문제를 풀었습니다


Largest Twin Primes
<http://en.wikipedia.org/wiki/Twin_prime Twin primes> are primes p1, p2 = p1 + 2 such that both p1 and p2 are prime numbers. Giv...

7년 초과 전

문제를 풀었습니다


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

7년 초과 전

문제를 풀었습니다


Check if equal
Return true if all the elements of an nD array are equal, false otherwise.

7년 초과 전

문제를 풀었습니다


Count decimal digits of a number
* Given an integer number you have to return the number of its digits. * For example 248 has 3 digits and 1589 has 4 digits ...

7년 초과 전

문제를 풀었습니다


Convert a numerical matrix into a cell array of strings
Given a numerical matrix, output a *cell array of string*. For example: if input = 1:3 output is {'1','2','3'} whic...

7년 초과 전

문제를 풀었습니다


Sum of odd numbers in a matrix
Find the sum of all the odd numbers in a matrix. Example x = [2 3 5 7 1 4 11] y = 27

7년 초과 전

문제를 풀었습니다


Calculate the derivative of a polynomial
Example: in = [ 1 1 1 ] out = [ 2 1 ]

7년 초과 전

문제를 풀었습니다


Matlab Basics - Pick out parts of a vector
Consider x a vector of length >= 7 (there are at least 7 elements in the vector, write a script that extracts the 2nd element, a...

7년 초과 전

문제를 풀었습니다


Finding values in arrays
Assign numMatches with the number of elements in userValues that equal matchValue. Ex: If matchValue = 2 and userVals = [2, ...

7년 초과 전

문제를 풀었습니다


Convert from Base 10 to base 5
Convert the input number from base 10 into base 5: for example: if a(in base 10)= 5 then a(in base 5)= 10

7년 초과 전

문제를 풀었습니다


The Dark Side of the Die
It is well-known that opposite sides of a classic hexahedral die add to 7. Given a vector of dice rolls, calculate the sum of th...

7년 초과 전

문제를 풀었습니다


Matlab Basics II - Free Fall
An object freely falling from rest under gravity covers a distance x given by: x = 1/2 gt^2 write a function that calculat...

7년 초과 전

문제를 풀었습니다


If-then-else
Complete the function below such that if the value of x is in the range 10 to 14, inclusive, the value 18 is assigned to y. Oth...

7년 초과 전

문제를 풀었습니다


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

7년 초과 전

문제를 풀었습니다


Function call: Kilometers to miles
Assign rateMPH with the corresponding rate in miles per hour given a user defined rateKPH, which is a rate in kilometers per hou...

7년 초과 전

문제를 풀었습니다


Convert Fahrenheit to Celsius
Calculate the Celsius temperature C given the Fahrenheit temperature F. Examples: Input F = 90 Output C is 32.22 I...

7년 초과 전

문제를 풀었습니다


Writing a recursive math function
Complete the recursive function RaiseToPower(). Ex: If userBase is 2 and userExponent is 4, then raisedValue is assigned wit...

7년 초과 전

더 보기