문제를 풀었습니다


Flip the main diagonal of a matrix
Given a n x n matrix, M, flip its main diagonal. Example: >> M=magic(5); >> flipDiagonal(M) 9 24 1 ...

3개월 전

문제를 풀었습니다


Make an awesome ramp for a tiny motorcycle stuntman
Okay, given a vector, say v=[1 3 6 9 11], turn it into a matrix 'ramp' like so: m=[1 3 6 9 11; 3 6 9 11 0; 6 9 ...

3개월 전

문제를 풀었습니다


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

3개월 전

문제를 풀었습니다


Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, generate an output matrix that consists o...

3개월 전

문제를 풀었습니다


Remove NaN ?
input -> matrix (n*m) with at least one element equal to NaN; output -> matrix(p*m), the same matrix where we deleted the enti...

3개월 전

문제를 풀었습니다


Remove the air bubbles
Given a matrix a, return a matrix b in which all the zeros have "bubbled" to the top. That is, any zeros in a given column shoul...

3개월 전

문제를 풀었습니다


Mirror Image matrix across anti-diagonal
Given an input number x, create a mirror image matrix 'Y' across the anti-diagonal. For example, if x=3, Y = [1 2 3; ...

3개월 전

문제를 풀었습니다


Pascal's Matrix
Given an integer n &ge; 0, generate the ( _n_+1) &times; ( _n_+1) lower triangular <http://en.wikipedia.org/wiki/Pascal_matrix P...

3개월 전

문제를 풀었습니다


swap sign sum & multiply castles
It is an easy problem, if you know the answer. Given a square matrix of NxN ordinary numbers. Initially place N identical indi...

3개월 전

문제를 풀었습니다


Pi Estimate 1
Estimate Pi as described in the following link: <http://www.people.virginia.edu/~teh1m/cody/Pi_estimation1.pdf>

3개월 전

문제를 풀었습니다


Calculate Engine Power
Calculate Engine Power (P) in kW given the values of Torque(M) in Nm and Engine Speed(n) in rpm

3개월 전

문제를 풀었습니다


First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero i...

3개월 전

문제를 풀었습니다


Getting the indices from a matrix
Inspired by Problem 645. Getting the indices from a matrix. Given a matrix A (or a vector), return the indices (always in row...

3개월 전

문제를 풀었습니다


Energy Conversion 1

3개월 전

문제를 풀었습니다


Area Conversion 2

3개월 전

문제를 풀었습니다


Mass Conversion 2

3개월 전

문제를 풀었습니다


Temperature Conversion 3
Given a temperature in Celcius, convert it to Fahrenheit.

3개월 전

문제를 풀었습니다


Temperature Conversion 2

3개월 전

문제를 풀었습니다


Temperature Conversion 1

3개월 전

문제를 풀었습니다


Area Conversion 1

3개월 전

문제를 풀었습니다


Energy Conversion 2

3개월 전

문제를 풀었습니다


Velocity Conversion
Given a velocity in mph, convert it to km/h. Round the answer to the fourth decimal place.

3개월 전

문제를 풀었습니다


Find Rows with Specift Properities
Delete rows with specific properites as following: Find rows that have a negative value in any element of the row and delete it...

3개월 전

문제를 풀었습니다


remove every row&col for every nan
for a given matrix, remove the row and column of every nan. Example x=[1 2 NaN 4 5 6 7 8 ...

3개월 전

문제를 풀었습니다


Column Removal (★★★)
(copy of prob 7) Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2...

3개월 전

문제를 풀었습니다


Remove entire row and column in the matrix containing the input values
Remove the entire row and column from the matrix containing specific values. The specified value can be a scalar or a vector. Fo...

3개월 전

문제를 풀었습니다


Remove all the columns contains only zero
Remove the column from the matrix which has only zeros . Refer the Example below a= 1 0 3 0 23 0 56 0 1 ...

3개월 전

문제를 풀었습니다


row removal
Consider a matrix and remove the first row of the matrix.

3개월 전

문제를 풀었습니다


Remove a specific column with min value
Remove the column that contain the min value in the matrix? If you like the problem, please give it a like:)

3개월 전

문제를 풀었습니다


Remove a specific column with max value
Remove the column that contain the max value in the matrix? If you like the problem, please give it a like:)

3개월 전

더 보기