A résolu


Unique: Speed Enhancement for uint(8,16,32)
This Speed Performance Challenge is to optimize Unique for processing uint8/uint16/uint32 variables. *Input:* A (column vecto...

presque 11 ans il y a

A résolu


Unique: Enhanced Performance - Large and Wide Array - Speed Improvement (66% savings)
The Challenge is to perform very fast unique function for a long and wide array. The data is small integer representing data ...

presque 11 ans il y a

A résolu


Unique: Enhanced Performance - Avoiding Memory Crash
The Challenge is to create the unique array for a long and wide array. Difficulties are that the normal unique(a,'rows') func...

presque 11 ans il y a

A résolu


Derivative function
Given a function handle f, generate a function that evaluates the derivative of f Examples: f = @sin; df = De...

presque 11 ans il y a

A résolu


ismember: Enhanced Time Performance for 'rows' - Speed Scoring (90% savings)
The Challenge is to perform very fast the 'ismember' function for a long and wide array. The data is small integer representi...

presque 11 ans il y a

A résolu


ismember: Enhanced Performance for 'rows' and width - Speed Scoring (66% savings)
The Challenge is to perform very fast the 'ismember' function for a long and wide array. The width of the array is expanded fro...

presque 11 ans il y a

A résolu


Usage of varargout
This Challenge is to demonstrate usage of varargout. Output a cell array using varargout of magic squares of size 1 thru n. ...

presque 11 ans il y a

A résolu


Global usage
This Challenge is to utilize Global variables. Global variables are risky as the subroutine may inadvertently and unwantingly...

presque 11 ans il y a

A résolu


Persistent Usage
This Challenge is to implement the Matlab Persistent variable capability. Given a sequence of Calls to a function return the ...

presque 11 ans il y a

A résolu


R2012b atan in Degrees
Return in degrees the atan result of inputs for all four quadrants. *Examples:* [x, y] Degrees 1 0 0 1 1 ...

presque 11 ans il y a

A résolu


Unique: Faster 'rows' for large array of uint8
Challenge: Execute unique(a,'rows') Faster for 'a' being uint8. The "unique" function for the 'rows' options may be performe...

presque 11 ans il y a

A résolu


Unique: Faster for options 'rows' and 'stable' for large array of uint8
Challenge: Execute unique(a,'rows','stable') Faster for 'a' being uint8. The "unique" function for the 'rows' and 'stable' o...

presque 11 ans il y a

A résolu


Cubic Integer Constrained Solution
Find an integral non-trivial solution (x,y,z ~=0) (x=0 or y=0 or z=0 are trivial) for the cubic equation 987,654,321x + ...

presque 11 ans il y a

A résolu


Sum the Infinite Series
Given that 0 < x and x < 2*pi where x is in radians, write a function [c,s] = infinite_series(x); that returns with the...

presque 11 ans il y a

A résolu


Accumulate Cells
Given a combining function, a cell array, and an initial value, accumulate the result. For example, accumcell(@plus,{1,...

presque 11 ans il y a

A résolu


Make a 1 hot vector
Make a vector of length _N_ that consists of all zeros except at index _k_, where it has the value 1. Example: Input ...

presque 11 ans il y a

A résolu


How to reverse spdiags ?
The spdiags function extracts all nonzero diagonals from the m-by-n matrix A. So if A=[1 2 3;4 5 6;7 8 9], spdiags(A)=[7 4...

presque 11 ans il y a

A résolu


Moore-Penrose pseudoinverse of matrix
Find the command for Moore-Penrose pseudoinverse of matrix and solve

presque 11 ans il y a

A résolu


Rotate counterclockwise a matrix 90 deg with left-bottom element
Example: Input [ 1 2 3 4 5 6 ] Output [ 3 6 2 5 1 4 ]

presque 11 ans il y a

A résolu


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

presque 11 ans il y a

A résolu


Sum the elements in either diagonal of a square matrix
Sum the elements of a square matrix that lie on either the major diagonal or anti-diagonal.

presque 11 ans il y a

A résolu


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

presque 11 ans il y a

A résolu


Get the elements of diagonal and antidiagonal for any m-by-n matrix
In the problem <http://www.mathworks.com/matlabcentral/cody/problems/858-permute-diagonal-and-antidiagonal Problem 858. Permute ...

presque 11 ans il y a

A résolu


Permute diagonal and antidiagonal
Permute diagonal and antidiagonal For example [1 2 3;4 5 6;7 8 9] -> [3 2 1;4 5 6;9 8 7] WITHOUT diag function (and variable n...

presque 11 ans il y a

A résolu


Bruh
Return 'bruh'.

presque 11 ans il y a

A résolu


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

presque 11 ans il y a

A résolu


Accessing elements on the diagonal
Access the diagonal elements of a matrix without 'diag' function

presque 11 ans il y a

A résolu


Program an exclusive OR operation with logical operators
Program an exclusive or operation *without* using the MATLAB function xor. Use logical operators like |, &, ~, ... instead. ...

presque 11 ans il y a

A résolu


Find Missing Number
A little problem (inspired by CodeChef) for the coffee break. A friend give you an array of size n-1 integers and these int...

presque 11 ans il y a

A résolu


surface of a spherical planet
you just discovered its circumference, that is the input.

presque 11 ans il y a

Charger plus