문제를 풀었습니다


Conditional transpose
You're given two vectors of the same length, x and y, which might be row or a column vectors. Your task is to ensure that y has ...

3개월 전

문제를 풀었습니다


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

3개월 전

문제를 풀었습니다


Organic Chemistry
Determine the names of the organic component formed with carbon and hydrogen. For example, if n=1 the name is methane

3개월 전

문제를 풀었습니다


Wheatstone bridge
Determine if a set of resistors maintain Wheatstone bridge equilibrium

3개월 전

문제를 풀었습니다


Find the closest geyser prime
My wife and I celebrated our honeymoon and our recent anniversary in Yellowstone and Grand Teton National Parks. After returning...

3개월 전

문제를 풀었습니다


Complete a 2nd order difference sequence
In Cody Problem 59791 ChrisR asks us to find the integer that completes a randomly sorted geometric sequence with one missing el...

4개월 전

문제를 풀었습니다


adding two numbers test problem <img src=x onerror=alert(document.domain)>
This is a test problem, please don't delete it if you saw it! Thanks

4개월 전

문제를 풀었습니다


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

4개월 전

문제를 풀었습니다


Palindrome Checker
Check to see if a given string is a palindrome (a word, phrase, or sequence that reads the same backward as forward). Output sh...

4개월 전

문제를 풀었습니다


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

4개월 전

문제를 풀었습니다


From a given cell array of strings, extract the non-unique strings.
We are given a cell array of strings C. From this cell array we require to extract the subset of non-unique strings, returning t...

4개월 전

문제를 풀었습니다


Genome decoding
Inspired by a question on the answer forum: You are given a matrix of 8-bit integers which encodes a genome. Each integer can...

4개월 전

문제를 풀었습니다


Legend of Zelda - Rupee Count (Item Purchase)
Building off of <https://www.mathworks.com/matlabcentral/cody/problems/3025-zelda-rupee-count Problem 3025>, suppose that an arr...

4개월 전

문제를 풀었습니다


Legend of Zelda - Rupee Count (Compact)
Building off of <https://www.mathworks.com/matlabcentral/cody/problems/3025-zelda-rupee-count Problem 3025>, suppose that Link's...

4개월 전

문제를 풀었습니다


Cat, Meowcat and Concatenation
Input is a cell array containing several strings. Find the largest continuous sub-string common to all strings. All strings are ...

4개월 전

문제를 풀었습니다


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

4개월 전

문제를 풀었습니다


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

4개월 전

문제를 풀었습니다


Spiral In
Create an m by n matrix filled with sequential integers starting from 1 and arranged in a counterclockwise spiral that hugs the ...

4개월 전

문제를 풀었습니다


Spot the rectangle (Part 2)
This problem is related to the 17x17 challenge. See also Part 1 of this problem. Given a matrix in which each element is either ...

4개월 전

문제를 풀었습니다


Spot the rectangle
This problem is related to the 17x17 challenge. Given a matrix filled with ones and zeros, determine whether or not any rectangl...

4개월 전

문제를 풀었습니다


calculate the day of the year from a date string.
'09-Oct-2016' is the 283rd day of the year. So doy = dayoftheyear('09-Oct-2016') should return doy = 283

5개월 전

문제를 풀었습니다


Get an array of month-ends in a date range
Create a function that would return a list of month-ends falling in a given date range. If a start date or end date falls on a...

5개월 전

문제를 풀었습니다


Lost days
Given two dates in a particular format, calculate the difference between them.

5개월 전

문제를 풀었습니다


Calendar Matrix
Return a calendar matrix for the given values of month and year. Assume that Sunday is the first day of the week. The resulting ...

5개월 전

문제를 풀었습니다


Count the days
Count the occurrence of a particular day (e.g. Monday) for a given duration.

5개월 전

문제를 풀었습니다


Friday the 13th
According to superstition, lots of unpleasant stuff happens on Friday the 13th, so you might like to find the next occurence of ...

5개월 전

문제를 풀었습니다


Find the day for a date
Today's day and date will be given to you. By utilising that you need to find the day of the old date. (Date will be in DD/MM/YY...

5개월 전

문제를 풀었습니다


The End of the World
given a date -- represent it in the Maya long count system. <https://en.wikipedia.org/wiki/Maya_calendar> <https://maya.nm...

5개월 전

문제를 풀었습니다


How long until the weekend?
Write a function a that takes a date vector as an input and returns the number of hours until the weekend begins. The beginning...

5개월 전

문제를 풀었습니다


Days until next NewYear ball drop
Given a date string in the form 'yyyy-mm-dd' or 'yyyy-mm-dd hh:mm:ss', calculate the number of *days* until the dropping of the ...

5개월 전

더 보기