Community Profile

# pham xuan hoa

Last seen: 10 months ago Active since 2021

#### Content Feed

View by

Solved

~~~~~~~ WAVE ~~~~~~~~~
|The WAVE generator| Once upon a time there was a river. 'Sum' was passing by the river. He saw the water of the river that w...

11 months ago

Solved

Is A the inverse of B?
Given a matrix A and a matrix B, is A the inverse of B? >>A=[2,4;3,5]; >>B=[-2.5,2;1.5,-1]; >>isInverse...

11 months ago

Solved

Rotate Matrix @180 degree
Rotate Matrix @180 degree Example A=[8 1 6; 3 5 7; 4 9 2], then answer would be [2 9 4;...

11 months ago

Solved

Converts numbers into characters
Converts numbers into characters

11 months ago

Solved

Find the max element of the array
Find the max element of the array

11 months ago

Solved

Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.

11 months ago

Solved

Calculate the average value of the elements in the array
Calculate the average value of the elements in the array

11 months ago

Solved

to the 2 all elements
to the 2 all elements

11 months ago

Solved

the average value of the elements
Calculate the average value of the elements in the array

11 months ago

Solved

Double all elements in the array
Duplicate all elements in the array

11 months ago

Solved

calculate the length of matrix
input 1 array, calculate the length

11 months ago

Solved

Draw a '0' in a one matrix!

11 months ago

Solved

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

11 months ago

Solved

Project Euler: Problem 7, Nth prime
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the Nth prime nu...

11 months ago

Solved

Project Euler: Problem 5, Smallest multiple
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smalle...

11 months ago

Solved

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

11 months ago

Solved

Find all vampire fangs
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...

11 months ago

Solved

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

11 months ago

Solved

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

11 months ago

Solved

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

11 months ago

Solved

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

11 months ago

Solved

Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

11 months ago

Solved

Get all prime factors
List the prime factors for the input number, in decreasing order. List each factor. If the prime factor occurs twice, list it as...

11 months ago

Solved

Multiples of a Number in a Given Range
Given an integer factor _f_ and a range defined by _xlow_ and _xhigh_ inclusive, return a vector of the multiples of _f_ that fa...

11 months ago

Solved

Project Euler: Problem 8, Find largest product in a large string of numbers
Find the greatest product of five consecutive digits in an n-digit number. 73167176531330624919225119674426574742355349194934...

11 months ago

Solved

Matrix indexing with two vectors of indices
Given a matrix M and two index vectors a and b, return a row vector x where x(i) = M(a(i),b(i)).

11 months ago

Solved

middleAsColumn: Return all but first and last element as a column vector
Given input A, return all but the first and last elements, arranged as a column vector. (I.e., all dimensions after the first s...

11 months ago

Solved

Reverse the elements of an array
Reverse the order of elements in an array: eg: input X = [ 1 2 3 ; 4 5 6 ; 7 8 9 ] o...

11 months ago

Solved

Set some matrix elements to zero
First get the maximum of each *row*, and afterwards set all the other elements to zero. For example, this matrix: 1 2 3 ...

11 months ago

Solved

surrounded matrix
With a given matrix A (size m x n) create a matrix B (size m+2 x n+2) so that the matrix A is surrounded by ones: A = [1 2 ...

11 months ago