A résolu


Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

plus de 2 ans il y a

A résolu


Determine given vector is even or odd
Find the numbers of the input vector is odd or even then replace even with 1 and odd with 0 Example x = [ 3 3 4 6 1] ...

plus de 2 ans il y a

A résolu


determine amount cookies left
started with 3 cookies and you never ate any how many are left

plus de 2 ans il y a

A résolu


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

plus de 2 ans il y a

A résolu


lb to kilogram
convert lb to kilogram units, easy

plus de 2 ans il y a

A résolu


currency converter
given a rate of exchange calculate the equivalent units of 100 USD

plus de 2 ans il y a

A résolu


print

plus de 2 ans il y a

A résolu


Find vampire numbers
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 th...

plus de 2 ans il y a

A résolu


Generalised Hamming Number
Inspired by Project Euler n°204 and Problem 1308 by James A generalised Hamming number of type n, has no prime factor larger ...

plus de 2 ans il y a

A résolu


Max of a Vector
Write a function to return the max of a vector

plus de 2 ans il y a

A résolu


Return 'on' or 'off'
When the input is true, return 'on', otherwise, return 'off'.

plus de 2 ans il y a

A résolu


STOP that car!!!
The maximum allowed speed for this road is 100. Find the cars that didn't observe the speed limit Arrest and fine them!!!

plus de 2 ans il y a

A résolu


Count up then down
Create a function that produces counting up from 0 up to n then down to 0 n=2 --> 0 1 2 1 0 n=3 --> ...

plus de 2 ans il y a

A résolu


length of a vector
Find twice the length of a given vector.

plus de 2 ans il y a

A résolu


Is My Wife Wrong?
Answer the question. (see also <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right Problem 149: Is my ...

plus de 2 ans il y a

A résolu


find radius of cone
if Slant height of Cone(I)& hight of Cone(H) given then find radius of the Cone(R) for example I=5,h=4 then the ans R=3;

plus de 2 ans il y a

A résolu


Smith numbers
Return true if the input is a Smith number in base ten. Otherwise, return false. Read about Smith numbers at <http://en.wikipedi...

plus de 2 ans il y a

A résolu


Proper Factors
Generate the proper factors of input integer x and return them in ascending order. For more information on proper factors, refer...

plus de 2 ans il y a

A résolu


Numbers with prime factors 2, 3 and 5.
Make a function which takes one positive integer n and returns a matrix with the numbers of the form (2^i)*(3^j)*(5^k) which are...

plus de 2 ans il y a

A résolu


ZigZag matrix with reflected format
ZigZag MATRIX with REFLECTED format. We have only input x. We have to create a matrix in the following pattern. input n=5...

plus de 2 ans il y a

A résolu


Create an n-by-n null matrix and fill with ones certain positions
The positions will be indicated by a z-by-2 matrix. Each row in this z-by-2 matrix will have the row and column in which a 1 has...

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


The Matrix Construction
Given two input ,first one is CN (Column Number), Second one is Dim Can you produce such a matrix for example CN=6; Dim=2 ...

plus de 2 ans il y a

A résolu


Diagonal of a Spiral Matrix
Write a function that will return same output as diag(spiral(n)). The only exception is that spiral and diag functions are not a...

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

plus de 2 ans il y a

A résolu


Create a block diagonal matrix
A block diagonal matrix is a square matrix that can be written as A = [a 0 0 0 0 b 0 0 0 0 c 0 ...

plus de 2 ans il y a

A résolu


expand intervals vol.2
Similar to problem <http://www.mathworks.co.uk/matlabcentral/cody/problems/2528 2528>. This is a more general case, when bounds ...

plus de 2 ans il y a

A résolu


Specific Element Count
Given a vector _v_ and a element _e_, return the number of occurrences of _e_ in _v_. Note: NaNs are equal and there may be n...

plus de 2 ans il y a

A résolu


prime test
find largest 2 digit prime number

presque 3 ans il y a

Charger plus