문제를 풀었습니다


Mersenne Primes
A Mersenne prime is a prime number of the form M = 2^p - 1, where p is another prime number. For example, 31 is a Mersenne prim...

7년 초과 전

문제를 풀었습니다


Add a row of zeros on top of a matrix
Given a matrix, insert a row of zeros as the top row.

7년 초과 전

문제를 풀었습니다


Sort numbers by outside digits
Sort the array so that they are sorted as if their value was a 5 digit number made from the first three and last two digits of t...

7년 초과 전

문제를 풀었습니다


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

7년 초과 전

문제를 풀었습니다


Fill a zeros matrix
The aim is to fill an array of all zeros given a numerical value and the index of row and columns for this value. 3 Inputs: ...

7년 초과 전

문제를 풀었습니다


Returning a "greater than" vector
Given a vector, v, return a new vector , vNew, containing only values > n. For example: v=[1 2 3 4 5 6] n=3 vNew =...

7년 초과 전

문제를 풀었습니다


Populating an array with a for loop
Write a for loop to populate multiplicationTable with the multiples of baseValue from 0 to 5. Ex: If baseValue is 2, then mu...

7년 초과 전

문제를 풀었습니다


letter yes yes & letter no no
Split a string into two strings, first string has all alphabetic letters, next string has all the rest, keep the order please, o...

7년 초과 전

문제를 풀었습니다


Replacing a row
For matrix G=[1 2 3; 4 5 6; 7 8 9] Replace the 2nd row with 8s **remember to create matrix G

7년 초과 전

문제를 풀었습니다


Generate a string like abbcccddddeeeee
This is the string version of Problem 1035. <http://www.mathworks.com/matlabcentral/cody/problems/1035-generate-a-vector-like-1-...

7년 초과 전

문제를 풀었습니다


reverse string
input='rama' output='amar'

7년 초과 전

문제를 풀었습니다


Writing a function: MaxValue()
Write a local function named MaxValue that returns the maximum of two inputs numA and numB.

7년 초과 전

문제를 풀었습니다


Factorial Numbers
Factorial is multiplication of integers. So factorial of 6 is 720 = 1 * 2 * 3 * 4* 5 *6 Thus 6 factorial = factorial(720)....

7년 초과 전

문제를 풀었습니다


Divisors of an integer
Given a number N, return a vector V of all integers that divide N. For example, N = 10 Then V=[1 2 5 10]

7년 초과 전

문제를 풀었습니다


Multiply by 3
Given the variable x as your input, multiply it by three and put the result in y.

7년 초과 전

문제를 풀었습니다


Convert letters to Greek letter
Write a switch statement that checks origLetter. If origLetter is 'a' or 'A', assign greekLetter with 'Alpha'. If origLetter is ...

7년 초과 전

문제를 풀었습니다


Genetic markers test
Assign testResult with 1 if either geneticMarkerA is 1 or geneticMarkerB is 1. If geneticMarkerA and geneticMarkerB are both 1, ...

7년 초과 전

문제를 풀었습니다


Equality check: Number of bricks
Write an if statement that assigns deliveryComplete with 1 if bricksDelivered is equal to bricksExpected.

7년 초과 전

문제를 풀었습니다


System of equations
Find a solution to a system of equations represented by a |n| by |n+1| matrix. For instance, [ 2 0 4; => 2*x = 4 ...

7년 초과 전

문제를 풀었습니다


Negative Infinity
Round the given array a towards negative infinity.

7년 초과 전

문제를 풀었습니다


Vectorizing, too easy or too hard?
Please insert a . before any ^, * or / in the string. That's it!!

7년 초과 전

문제를 풀었습니다


Matlab Basics - Set unwanted parts of a vector to zero
Consider a vector x, of length >= 7, write a script to set elements 2, 5, and 6 to zero. Example x = [1 2 3 4 5 6 7] --> ...

7년 초과 전

문제를 풀었습니다


Twins in a Window
<http://en.wikipedia.org/wiki/Twin_primes Twin primes> are prime numbers that differ by 2, such as [11,13] or [41,43]. Write a f...

7년 초과 전

문제를 풀었습니다


collision
several cars (n) were involved in this collision, the input matrix (vm) has n rows and two columns, first column for velocity an...

7년 초과 전

문제를 풀었습니다


Given a matrix, return the last eigen value
Given a matrix, return the first eigen value For example: x = magic(5) 17 24 1 8 15 23 5 7 14 ...

7년 초과 전

문제를 풀었습니다


Check bounds
Assign inRange with 1 if userWeight is greater than 100 and less than or equal to 200.

7년 초과 전

문제를 풀었습니다


Roots
Find out the roots of a given polynomial equation.Given are the coefficients of the equation.

7년 초과 전

문제를 풀었습니다


Multiple if statements
Write an if-statement that subtracts 5 from outputValue if amplitudeResponse is greater than 10. Write a second if-statement tha...

7년 초과 전

문제를 풀었습니다


Colon operator of two vectors
You are given two vectors of equal length: VecStart, VecEnd Each vector contain a set of integers, where VecEnd(j)>=VecStar...

7년 초과 전

문제를 풀었습니다


Sum the entries of each column of a matrix which satisfy a logical condition.
Given a numeric matrix A and a logical array L of the same size as A, return a row vector S containing the columnwise sums of th...

7년 초과 전

더 보기