문제를 풀었습니다


Best Problem Elections
When I am writing those words, there are 2002 problems on Cody. Many of them are simply wonderful. Do you remember which of them...

9년 초과 전

문제를 풀었습니다


Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...

9년 초과 전

문제를 풀었습니다


Calculate inverse matrix in square matrix
A=eye(3) Calculate inverse matrix of given input. B=function(A) ans = 1 0 0 0 1 0 ...

9년 초과 전

문제를 풀었습니다


Cell Source Index
Suppose that C is a cell array whose elements consist of row vectors of elements of the same type. For example, C could be a ce...

9년 초과 전

문제를 풀었습니다


Log of a number
Write a script that will give the log of x as output.

9년 초과 전

답변 있음
If I select an element in a matrix, say MAT(2,2), how to find how many elements of the same value of MAT(2,2) in the matrix are "connected" to it.
You need bwconncomp <https://it.mathworks.com/help/images/ref/bwconncomp.html> For example: Mat=[1 2 3 4 2;2 2 2 2 0;...

9년 초과 전 | 2

답변 있음
how to change or compliment a particular bit in the binary string?
Here it is a=50; b=dec2bin(a) pos = 4; b(pos) = char(97-double(b(pos)))

9년 초과 전 | 1

답변 있음
string to number conversion with mixed values
str1 = 'index_N=10' str2 = 'index_M=5' sub1 = str1(7:end) sub2 = str(7:end)

9년 초과 전 | 0

답변 있음
How do i adjust the spacing between the slices of my stacked images?
First, most probably you don't want to stack them in the 4-th dimension as you wrote rgb4D = cat(4, IA, IB, IC, ID); Bec...

9년 초과 전 | 0

문제를 풀었습니다


Adding each element
Add the each element of the matrix.

9년 초과 전

문제를 풀었습니다


What is Title of Cody Challenge 42?
Given a Cody Challenge number return its Title. *Input:* Cody Challenge Number *Output:* Title of the Cody Challenge ...

9년 초과 전

문제를 풀었습니다


Deriving a function using the difference quotient
Write a function that evaluates the derivative of a function in a given point using the well-know formula of the difference quot...

9년 초과 전

문제를 풀었습니다


Create an m x n array consisting only of an input value.
Create an array with m rows and n columns wherein all entries are assigned the input value x.

9년 초과 전

문제를 풀었습니다


Find files with extension ext in the current directory
List all files with extension 'ext' in the current directory. Return a char matrix with the name of files in rows. Return 0 if...

9년 초과 전

문제를 풀었습니다


For a given linear index as input for n sized square matrix, find corresponding row and column.
If input is 1, the row and column will be 1 and 1 respectively.

9년 초과 전

문제를 풀었습니다


Airline Ticket Mod7 Checksum
There are 13 digits in an airline ticket number. If an airline ticket number is valid, the 13th digit should be the remainder of...

9년 초과 전

문제를 풀었습니다


Corresponding letter to ASCII code.
Given the letter, the output will show the corresponding ASCII code.

9년 초과 전

문제를 풀었습니다


matrix zigzag
Unfold a 2-D matrix to a 1-D array in zig-zag order, e.g., for matrix [ 1 2 3 ; 4 5 6 ; 7 8 9 ] the resulting 1-...

9년 초과 전

문제를 풀었습니다


"Power matrix" of two vectors
Given two row vectors x,y of lengths m and n (respectively), create an m x n matrix whose i,j entry is x(i)^y(j).

9년 초과 전

문제를 풀었습니다


Permutations of input vector
Find and output all permutations of given vector

9년 초과 전

문제를 풀었습니다


Which way to go?
Given an m*n grid, How many ways are there to go from upper left corner to the lower right one? You can only move right...

9년 초과 전

문제를 풀었습니다


Sum my indices
Given inputs M and N (in that order), output an MxN matrix whose entries are equal to the sum of their indices. Example input...

9년 초과 전

문제를 풀었습니다


Convert number from given base to other base
Convert number from given base to other base. Example 400 in base 5, find equivalent number in base 8, it is 144.

9년 초과 전

문제를 풀었습니다


Combination logic
Create an algorithm in MATLAB that calculate the combination for the given positive integers n and k as inputs. When k > n, the ...

9년 초과 전

문제를 풀었습니다


Increase monotonically
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

9년 초과 전

문제를 풀었습니다


Step up
For given input array, output a array with all elements step up by two

9년 초과 전

문제를 풀었습니다


most frequent character
Obtain most frequent character Let s='balaram'; output='a';

9년 초과 전

문제를 풀었습니다


Soccer - TOTO
How many different outcomes are there in a soccer-TOTO with n games? For each game there are three results: win - loss - equa...

9년 초과 전

문제를 풀었습니다


Cofactor
Given a matrix, find the cofactor of the element in 'i'th row and 'j'th column.

9년 초과 전

문제를 풀었습니다


Repeat The Components of Matrix
Repeat The components of a matrix so that the size of the output matrix is double to input matrix and components are repeated ne...

9년 초과 전

더 보기