Gelöst


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 Monate vor

Gelöst


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 Monate vor

Gelöst


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 Monate vor

Gelöst


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 Monate vor

Gelöst


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 Monate vor

Gelöst


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 Monate vor

Gelöst


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 Monate vor

Gelöst


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 Monate vor

Gelöst


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 Monate vor

Gelöst


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

3 Monate vor

Gelöst


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

3 Monate vor

Gelöst


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 Monate vor

Gelöst


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 Monate vor

Gelöst


Energy Conversion 1

3 Monate vor

Gelöst


Area Conversion 2

3 Monate vor

Gelöst


Mass Conversion 2

3 Monate vor

Gelöst


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

3 Monate vor

Gelöst


Temperature Conversion 2

3 Monate vor

Gelöst


Temperature Conversion 1

3 Monate vor

Gelöst


Area Conversion 1

3 Monate vor

Gelöst


Energy Conversion 2

3 Monate vor

Gelöst


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

3 Monate vor

Gelöst


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 Monate vor

Gelöst


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 Monate vor

Gelöst


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 Monate vor

Gelöst


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 Monate vor

Gelöst


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 Monate vor

Gelöst


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

3 Monate vor

Gelöst


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 Monate vor

Gelöst


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 Monate vor

Mehr laden