문제를 풀었습니다


Reverse a string
Return a string with the characters in reverse order from a given input string Ex: my_str = "Ciao" function should output "...

1년 초과 전

문제를 풀었습니다


Convert RGB to Grayscale
Convert a 3 element RGB array to its correspoding grayscale pixel (a scalar) *Hint: a formula exists!

1년 초과 전

문제를 풀었습니다


Area of a rectangle
FInd the area of a rectangle with a length L and width W. Round to the nearest integer.

1년 초과 전

문제를 풀었습니다


Roll the Dice!
Description Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. Example [x1,x2] = rollDice(...

1년 초과 전

문제를 풀었습니다


Diagonal Product of A Square Matrix
For a matrix A, calculate the product of its diagonal elements. * Assume all input matrices are square & corresponding element...

1년 초과 전

문제를 풀었습니다


Sum All Positive Elements
Output a scalar that is equal to the sum of all positive elements in a given vector/matrix. For Example: The sum of all positi...

1년 초과 전

문제를 풀었습니다


Remove the diagonal of a square matrix
Some Cody problems ask solvers to remove columns (e.g., CP 7), and others ask solvers to remove rows (e.g., CP 44033). Write a...

1년 초과 전

문제를 풀었습니다


Sum of Positive Elements in a Matrix
Given a matrix A, write a function that returns the sum of all positive elements in A. Input: A = [-3, 4, -1; 6, -2, 8] ...

1년 초과 전

문제를 풀었습니다


Remove Duplicate Words from a Sentence
Given a sentence as a string, remove all duplicate words while keeping their first occurrence and maintaining the original word ...

1년 초과 전

문제를 풀었습니다


Remove Duplicate Words from a Sentence.
Given a sentence, remove any duplicate words, leaving only the first occurrence of each word. The output sentence should have wo...

1년 초과 전

문제를 풀었습니다


Given length x find the area y of the square
Given length x find the area y of the square

1년 초과 전

문제를 풀었습니다


Test x = 1
Write a function to make the variable x = 1

1년 초과 전

문제를 풀었습니다


Matrix Rotation by 90 Degrees
In this problem, you are tasked with rotating a given matrix by 90 degrees in a counter-clockwise direction. The input will be a...

1년 초과 전

문제를 풀었습니다


Sum of Even Numbers in a Vector
Write a function that takes a vector x as input and returns the sum of all even numbers in x. Input: x = [1, 2, 3, 4, 5, 6] ...

1년 초과 전

문제를 풀었습니다


Integer Division Without Remainder
Write a function that takes two positive integers, a and b, and returns the result of integer division (quotient) without remain...

1년 초과 전

문제를 풀었습니다


Zero Out Negative Elements
Write a MATLAB function called zeroNegatives that takes a numeric vector v as input and returns a modified version where all neg...

1년 초과 전

문제를 풀었습니다


Greater than before
Given an array of integers, write a function that returns elements that are greater than the one before them. For instance, ...

1년 초과 전

문제를 풀었습니다


Given the mass and stiffness of an undamped SDOF system, find the natural frequency and the natural period of vibration
Problem Statement Given the mass and stiffness of an undamped SDOF system, find the system's natural frequency in both Hz and...

1년 초과 전

문제를 풀었습니다


Find the mean
Find the mean of a given sdet of numbers in a vector x

1년 초과 전

문제를 풀었습니다


sum numbers to some value n
sum of numbers up to a value n

1년 초과 전

문제를 풀었습니다


round pi
round pi

1년 초과 전

문제를 풀었습니다


Classify triangles as acute, obtuse, or right
In an acute triangle, the three interior angles are acute, or smaller than 90 degrees. In an obtuse triangle, one angle is obtus...

1년 초과 전

문제를 풀었습니다


Which coins to give
I was in shop today. I admired, how shop assistant had to think, which coins to give me. The task is we have a vector v=[0.5 0.2...

1년 초과 전

문제를 풀었습니다


Set some matrix elements to zero
First get the maximum of each *row*, and afterwards set all the other elements to zero. For example, this matrix: 1 2 3 ...

1년 초과 전

문제를 풀었습니다


Create a vector whose elements depend on the previous element
The idea is to create a vector A whose elements depend on the previous element : *A(i+1) = 2*A(i)+1* *2 Inputs*: - A : The...

1년 초과 전

문제를 풀었습니다


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

1년 초과 전

문제를 풀었습니다


06 - Matrix Equations 2
Define the vectors _aVec_ and _bVec_: <<http://samle.dk/STTBDP/Assignment1_2a.png>> and <<http://samle.dk/STTBDP/Assig...

1년 초과 전

문제를 풀었습니다


03 - Matrix Variables 5
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3e.png>>

1년 초과 전

문제를 풀었습니다


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

1년 초과 전

문제를 풀었습니다


Cody Computer Part 3 - Detect the graphic card used on Cody Computer
In the Cody computer investigation party, you may have already solved : Problem 522. Cody Computer Part 1 - Guess the system fo...

1년 초과 전

더 보기