A résolu


Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....

plus de 12 ans il y a

A résolu


Convert a Cell Array into an Array
Given a square cell array: x = {'01', '56'; '234', '789'}; return a single character array: y = '0123456789'

plus de 12 ans il y a

A résolu


Converting numbers back from extended form
Thanks for all the help you guys gave me on writing out the numbers in extended form in <http://www.mathworks.com/matlabcentral/...

plus de 12 ans il y a

A résolu


Upper triangular matrix
Create a function to retrieve the upper triangular matrix of a matrix (without using tril). The matrix will always be square. ...

plus de 12 ans il y a

Réponse apportée
How to display warning message withing while loop?
How exactly do you want to display the warning message? Do you want a dialog box to appear? Do you just want a message to appear...

plus de 12 ans il y a | 0

| A accepté

A résolu


Find nth maximum
Find nth maximum in a vector of integer numbers. Return NaN if no such number exists. x = [2 6 4 9 -10 3 1 5 -10]; So ...

plus de 12 ans il y a

A résolu


Local Minima
Given a vector of data x, find the values of local minimum that is smaller than its neighbor elements. For example, if x =...

plus de 12 ans il y a

A résolu


Count ones
Write a program to count number of ones (1s) in an integer variable input. For example: Input x=2200112231 output y=3 I...

plus de 12 ans il y a

A résolu


Returning a "greater than" vector
Given a vector, v, return a new vector , vNew, containing only values > n. For example: v=[1 2 3 4 5 6] n=3 vNew =...

plus de 12 ans il y a

A résolu


ベクトルのスケーリング
入力したベクトルの大きさを1にしてください。

plus de 12 ans il y a

A résolu


Signed Magnitude
For a given input vector, return the value that is furthest from zero. For example, if x = [1 2 -12] return -12.

plus de 12 ans il y a

A résolu


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input ...

plus de 12 ans il y a

A résolu


Enlarge array
Given an mxn numeric array (A) and a 1x2 vector (sz) indicating the dimensions [p q] to enlarge each element, return an (m*p)x(n...

plus de 12 ans il y a

A résolu


User defined nextpow function
Create a function which will take 2 arguments as n and x, and return y, where, n^y >= abs(x). [ Similar to builtin "nextpow2" fu...

plus de 12 ans il y a

A résolu


Binary
Given a positive, integer n, create a function that returns the respective binary number in the form of a vector. Example: ...

plus de 12 ans il y a

Réponse apportée
Indices to zeros in Matrix
[r,c] = find(A == 0) returns in r and c the row and column indices of *every single zero in the array*. Therefore, you're going ...

plus de 12 ans il y a | 2

| A accepté

A résolu


Create a matrix with difference of each row of input matrix
With a given input matrix A, create a output matrix B in such a way that each row in B is a difference of rows of input matrix A...

plus de 12 ans il y a

A résolu


Tridiagonal
Return an n-by-n matrix that has a, b, c as the subdiagonal, main diagonal, and superdiagonal entries in the matrix. Example ...

plus de 12 ans il y a

A résolu


Create an 8-color version of an image
This problem was inspired by a tweet I saw from @MATLAB regarding <http://www.mathworks.com/matlabcentral/fileexchange/37816-the...

plus de 12 ans il y a

A résolu


Usage of java.math : Add, Multiply, Pow
This challenge is an introduction to the wonderful word of java.math that allows unlimited precision calculations. The primary ...

plus de 12 ans il y a

A résolu


Pluralization
Define function plu(n) that returns '' (an empty string) if n=1, or 's' otherwise. This is handy for displaying messages from a...

plus de 12 ans il y a

A résolu


Matrix rotation as per given angle
Given a user defined matrix and angle of rotation, rotate the elements of output matrix as clockwise or anti-clockwise. Angle wi...

plus de 12 ans il y a

A résolu


Matrix to column conversion
Given a matrix of any size, convert it into a column vector. e.g A=[10 20 30; 40 50 60] then, B = [10; 40; ...

plus de 12 ans il y a

A résolu


Min of a Matrix
Return the minimum value in the given matrix.

plus de 12 ans il y a

A résolu


Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
The given function returns the index of the maximum value in a given matrix. such as X=[4,3,4,5,9,12,0,5] Ans= 6 if maxim...

plus de 12 ans il y a

A résolu


Find and replaces spaces from a input string with *
For a given input string str, find how many spaces are there in the string and replace those spaces with * e.g. str = 'this is ...

plus de 12 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 ...

plus de 12 ans il y a

Réponse apportée
Read set framents of string.
>> s = 'abcdefghR12X478Y124'; >> X = str2double(regexp(s,'(?<=X)\d+','match')) X = 478 >> Y = str2double(regexp...

plus de 12 ans il y a | 0

| A accepté

A résolu


Fangs of a vampire number
A <http://en.wikipedia.org/wiki/Vampire_number vampire number> is a number v that is the product of two numbers x and y such tha...

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

Charger plus