A résolu


Dudeney Numbers: Numbers which are the cube of their decimal sum
From Wikipedia: _A Dudeney number is a positive integer that is a perfect cube such that the sum of its decimal digits is equa...

environ 11 ans il y a

A résolu


Airline Ticket Mod7 Checksum
There are 13 digits in an airline ticket number. If an airline ticket number is valid, the 13th digit should be the remainder of...

environ 11 ans il y a

A résolu


Change the first and last diagonal element of the identity matrix to zero
Starting with the identity matrix, change first and last diagonal element to zero. Example If n=5 A = 0 0 ...

environ 11 ans il y a

A résolu


Replace odd number in given matrix by zero
Replace the odd numbers in a given matrix with zero. Example A = [ 17 24 1 8 15 23 5 7 ...

environ 11 ans il y a

A résolu


Find out total non zero element of matrix
Find out Non zero element of matrix A=magic(5) 17 24 1 8 15 23 5 7 14 16 4 6...

environ 11 ans il y a

A résolu


Find out sum of prime number till given number
Find out sum of prime number till given number Example, if number is 10, then answer must be 17.

environ 11 ans il y a

A résolu


Convert given decimal number to binary number.
Convert given decimal number to binary number. Example x=10, then answer must be 1010.

environ 11 ans il y a

A résolu


Squaring Matrix
Square the following matrix using matlab % A = 1 2 3 4 5 6 7 8 So new matrix should display...

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

environ 11 ans il y a

A résolu


Determine the Result of a Move in Reversi
Note: This is closely related to <http://www.mathworks.com/matlabcentral/cody/problems/2538-find-the-next-legal-move-in-reversi ...

environ 11 ans il y a

A résolu


Find similar sequences
Another problem inspired by a question on the <http://www.mathworks.com/matlabcentral/answers answers> forum. Given a matrix ...

environ 11 ans il y a

A résolu


Error handling
If the input is a negative number, generate an error. Otherwise, return the number.

environ 11 ans il y a

A résolu


Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

environ 11 ans il y a

A résolu


arithmetic progression
I've written a program to generate the first few terms of <https://en.wikipedia.org/wiki/Arithmetic_progression arithmetic progr...

environ 11 ans il y a

A résolu


Multiply Column
Given two input, one matrix and one scalar number For example A is a matrix given A = [ 1 2 2 5 2 5 2 3 4 6...

environ 11 ans il y a

A résolu


2048 Next Move
Given a board in the game 2048 (see the game here: <http://gabrielecirulli.github.io/2048/ 2048>) and a direction ('up','down','...

environ 11 ans il y a

A résolu


Replacing a row
For matrix G=[1 2 3; 4 5 6; 7 8 9] Replace the 2nd row with 8s **remember to create matrix G

environ 11 ans il y a

A résolu


Guess
A random number between 1 and 10 is created for the variable y. Guess what its value is.

environ 11 ans il y a

A résolu


Add 7
Given an input variable x, output a variable y that is 7 greater than x. Example: Input x = 1 Output y is 8 Input ...

environ 11 ans il y a

A résolu


Y=X
Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

environ 11 ans il y a

A résolu


Number Persistence
A number's persistence is the number of steps required to reduce it to a single digit by multiplying all its digits to obtain a ...

environ 11 ans il y a

A résolu


Sum of series VII
What is the sum of the following sequence: Σ(km^k)/(k+m)! for k=1...n for different n and m?

environ 11 ans il y a

A résolu


Shorten pathname
Given a pathname string, return a condensed version by replacing intermediate folders with '..'. *Example* If fullpat...

environ 11 ans il y a

A résolu


vector to string
Determine what the ASCII characters spell out. Example: input = [ 72 73 71 72] output = 'HIGH'

environ 11 ans il y a

A résolu


Go to the head of the class!
You're given a matrix and a single number. If that number is in the matrix, reorder the matrix so that number is in the first r...

environ 11 ans il y a

A résolu


Graph Algorithms 3: Number of Connected Components
Given an adjacency matrix of a simple undirected graph, find the number of connected components.

environ 11 ans il y a

A résolu


Pandigital Factors (Based on Euler 491)
A Pandigital Number is a number containing all of the digits from 0-9 inclusive, with the added stipulation that it does not hav...

environ 11 ans il y a

A résolu


Union of two set decreasing order
Union of two set decreasing order Say, x=[1 2 5] and y=[5 7 8] then answer must be [8 7 5 2 1]

environ 11 ans il y a

A résolu


Find out magnitude of vector
Find out magnitude of vector. Say x=[1 2 3], then answer must sqrt(1^2+2^2+3^2) Please don't use sum function.

environ 11 ans il y a

A résolu


Probability of Choosing a Red Ball
Given two jars of red and blue balls, find the probability of choosing a red ball from Jar 1 after going through the steps. ...

environ 11 ans il y a

Charger plus