Feeds
문제를 풀었습니다
Return the first and last character of a string
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...
거의 12년 전
문제를 풀었습니다
Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product
거의 12년 전
문제를 풀었습니다
Rotate a Matrix by 90 degrees
Rotate a Matrix by 90 degrees Example: If the input is: X = 1 2 3 4 5 6 7 8 9 ...
거의 12년 전
문제를 풀었습니다
Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.
거의 12년 전
문제를 풀었습니다
Multiply a column by a row
* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...
거의 12년 전
문제를 풀었습니다
Find the largest value in the 3D matrix
Given a 3D matrix, A, find the largest value. E.g. >> A = 1:9; >> A=reshape(A,[3 1 3]); >> islargest(A) ans = 9
거의 12년 전
문제를 풀었습니다
Reverse Run-Length Encoder
Given a "counting sequence" vector x, construct the original sequence y. A counting sequence is formed by "counting" the entrie...
거의 12년 전
문제를 풀었습니다
Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...
거의 12년 전
문제를 풀었습니다
Who knows the last digit of pi?
There is only one man who knows the last digit of pi, who is that man? Give the name of that man, who, by popular believe, can ...
12년 초과 전
문제를 풀었습니다
2 b | ~ 2 b
Given a string input, output true if there are 2 b's in it, false if otherwise Examples: 'Macbeth' -> false 'Publius Cor...
12년 초과 전
문제를 풀었습니다
Sorting
Assume that x is an n-by-2 matrix. The aim is to return the first column of x, but sorted according to the second column. Exa...
12년 초과 전
문제를 풀었습니다
Number of 1s in a binary string
Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...
12년 초과 전
문제를 풀었습니다
Back to basics 20 - singleton dimensions
Covering some basic topics I haven't seen elsewhere on Cody. Remove the singleton dimensions from the input variable (e.g. if...
12년 초과 전
문제를 풀었습니다
Back to basics 14 - Keywords
Covering some basic topics I haven't seen elsewhere on Cody. Return a cell array of all MATLAB keywords
12년 초과 전
문제를 풀었습니다
Back to basics 1 - Saving
Covering some basic topics I haven't seen elsewhere on Cody. Given an input variable 'x', save it to disk in a file named 'co...
12년 초과 전
문제를 풀었습니다
Project Euler: Problem 10, Sum of Primes
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below the input, N. Thank you <http:/...
12년 초과 전
문제를 풀었습니다
Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...
12년 초과 전
문제를 풀었습니다
Back to basics 2 - Function Path
Covering some basic topics I haven't seen elsewhere on Cody. Given a string that is the name of a MATLAB function, return a s...
12년 초과 전
문제를 풀었습니다
Distance walked 3D
suppose you go from x-y-z coordinates [3,4,2] to [0,0,2] to [0,1,2] to [1,1,2], to [1,1,20] then you walked 25 units of distance...
12년 초과 전
문제를 풀었습니다
Back to basics 23 - Triangular matrix
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, return a matrix with all elements above a...
12년 초과 전
문제를 풀었습니다
Back to basics 7 - Equal NaNs
Covering some basic topics I haven't seen elsewhere on Cody. Given 2 input variables, output true if they are equal, false ot...
12년 초과 전
문제를 풀었습니다
Back to basics 9 - Indexed References
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix and row and column, output the index of th...
12년 초과 전
문제를 풀었습니다
Filter AC, pass DC
Input x is the sampled signal vector, may have both AC and DC components. Output vector y should not contain any AC component. ...
12년 초과 전
문제를 풀었습니다
Back to basics 12 - Input Arguments
Covering some basic topics I haven't seen elsewhere on Cody. Return a value equal to the number of input arguments to the fun...
12년 초과 전
문제를 풀었습니다
Back to basics 10 - Max Float
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive floating-point number MATLAB can han...
12년 초과 전
문제를 풀었습니다
So many choices
For inputs _n_ and _k_ (in that order), output the number of ways that k objects can be chosen from amongst n distinct objects. ...
12년 초과 전
문제를 풀었습니다
Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12
12년 초과 전
문제를 풀었습니다
Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector of numbers, output a square array with the...
12년 초과 전