문제를 풀었습니다


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

9년 초과 전

문제를 풀었습니다


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

9년 초과 전

문제를 풀었습니다


Matlab Basics - Set unwated 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. e.g. x = [1 2 3 4 5 6 7] --> x = [1 ...

9년 초과 전

문제를 풀었습니다


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

9년 초과 전

문제를 풀었습니다


Insect population
An insect population doubles every generation. * Write a while loop that iterates numGeneration times. * Write a statment ...

9년 초과 전

문제를 풀었습니다


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

9년 초과 전

문제를 풀었습니다


Bell Number calculator
Calculate a vector of Bell numbers for sets up to length n. Bell numbers are the maximum number of partitions of a set. See the ...

9년 초과 전

문제를 풀었습니다


multiply by three
Given the variable x as your input, multiply it by 3 and put the result equal to y. Examples: Input x = 2 Output y is ...

9년 초과 전

문제를 풀었습니다


Symmetry of vector
Determine whether the vector is symmetric or not (vector could be even or odd in length). For example: x = [1 2 3 3 2 1] ...

9년 초과 전

문제를 풀었습니다


Small aircraft weight limit
Write an if-else statement that evaluates to true if the sum of passengerWeight and cargoWeight is less than or equal maxWeight....

9년 초과 전

문제를 풀었습니다


Food safety
Assign safeTemperature with 1 if foodTemperature is less than 40 or greater than 165.

9년 초과 전

문제를 풀었습니다


Double summation
Write two nested for loops to calculate the following double summation: <<https://drive.google.com/uc?id=0B74PAULDIwwsWFhlNTV...

9년 초과 전

문제를 풀었습니다


Perfect Square or not
find Given input x is perfect square or not,if yes then output y=1.else y=0

9년 초과 전

문제를 풀었습니다


Matlab Basics - y as a function of x
write a script to calculate y as a function of x, such that y = 6x^2 + 5x - 2

9년 초과 전

문제를 풀었습니다


Generate pi using logarithm
Generate pi using logarithm

9년 초과 전

문제를 풀었습니다


Bridge toll
Complete the example to calculate finalToll. The base toll for a bridge is baseToll. If the vehicle's weight is over 5,000 pound...

9년 초과 전

문제를 풀었습니다


convert matrix to single column
given any matrix, convert it to single column

9년 초과 전

문제를 풀었습니다


Remove from a 2-D matrix all the rows that contain at least one element less than or equal to 4
Example: in = magic(5) in = 17 24 1 8 15 23 5 7 14 16 4 6 13 20 ...

9년 초과 전

문제를 풀었습니다


Matlab Basics - Absolute Value
Write a script that returns the absolute value of the elements in x e.g. x = [-1 -2 -3 -4] --> y = [1 2 3 4]

9년 초과 전

문제를 풀었습니다


Duplicate a character
Duplicate a character 'n' times. Example 1: str='a' n=5 output='aaaaa' Example 2: str='*' n=3 output='***'

9년 초과 전

문제를 풀었습니다


Area of rhombus
Calculate the rhombus area

9년 초과 전

문제를 풀었습니다


Is it an Armstrong number?
An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. Fo...

9년 초과 전

문제를 풀었습니다


Better bullseye matrix
<http://www.mathworks.com/matlabcentral/cody/problems/18-bullseye-matrix Problem 18> asks to create a bullseye matrix like this:...

9년 초과 전

문제를 풀었습니다


Sophie Germain prime
In number theory, a prime number p is a *Sophie Germain prime* if 2p + 1 is also prime. For example, 23 is a Sophie Germain prim...

9년 초과 전

문제를 풀었습니다


poll: would you like the regexp (?@cmd) functionality to be banned in Cody?
This problem is a poll (and a little bit of "white hat hacktivism" as well) regarding Cody users sentiment about the use of rege...

9년 초과 전

문제를 풀었습니다


Find the "ordinary" or Euclidean distance between A and Z
A, B and Z define three points in the 3D _Euclidean_ space of the form: A = [x1;y1;0]; B = [x2;y2;0]; Z = [x2;y2;z]; Find th...

9년 초과 전

문제를 풀었습니다


Test if a Number is a Palindrome without using any String Operations
*Description* Given an integer _X_, determine if it is a palindrome number. That is, _X_ is equal to the _X_ with the digits ...

9년 초과 전

문제를 풀었습니다


Reverse Concatenation
Suggest methods to form a Matrix after deleting one of the input's elements. Input should be element's position and output shou...

9년 초과 전

문제를 풀었습니다


Count consecutive 0's in between values of 1
So you have some vector that contains 1's and 0's, and the goal is to return a vector that gives the number of 0's between each ...

9년 초과 전

문제를 풀었습니다


Binary code (array)
Write a function which calculates the binary code of a number 'n' and gives the result as an array(vector). Example: Inpu...

9년 초과 전

더 보기