Community Profile

photo

Peiyi Yao


Last seen: 3 dagar ago
760 total contributions since 2015

Peiyi Yao's Badges

  • Community Group Solver
  • Scholar
  • CUP Challenge Master
  • Solver

View details...

Contributions in
View by

Solved


Matrix Pattern 1

5 dagar ago

Solved


Find the maximum number of decimal places in a set of numbers
Given a vector or matrix of values, calculate the maximum number of decimal places within the input. Trailing zeros do not coun...

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

6 dagar ago

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

7 dagar ago

Solved


Make roundn function
Make roundn function using round. x=0.55555 y=function(x,1) y=1 y=function(x,2) y=0.6 y=function(x,3) ...

3 månader ago

Solved


Rounding off numbers to n decimals
Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...

3 månader ago

Solved


Rotate input square matrix 90 degrees CCW without rot90
Rotate input matrix (which will be square) 90 degrees counter-clockwise without using rot90,flipud,fliplr, or flipdim (or eval)....

3 månader ago

Solved


How many Integers?
Count the integers in a given vector |v|. You *must* use a loop to count each element separately. Examples: Input: v...

3 månader ago

Solved


Calculate Inner Product
Given two input matrices, |x| and |y|, check if their inner dimensions match. * If they match, create an output variable |z|...

3 månader ago

Solved


Find square of given number
Find Square of any number

9 månader ago

Solved


Square root of number
Square root of given number.

9 månader ago

Solved


Triangle???
Calculate the circumference of an equilateral triangle with x

9 månader ago

Solved


Sum Sum Sum!
Calculate the sum of the natural numbers from 1 to n

9 månader ago

Solved


Double Factorial
Return double factorial n(n-2)...(5)(3)(1), n>0, odd n!! = n(n-2)...(6)(4)(2), n>0, even 1 ...

9 månader ago

Solved


Calculate the area of a circle
Given a circle of diameter x calculate its area

9 månader ago

Solved


Quadratic equation
given three inputs (a, b, c) for the equation a*x^2+b*x+c=0; return 1 if the roots are complex (non zero imaginary), and 0 if th...

9 månader ago

Solved


Check prime numbers
Let x, return 1 if x is a prime number, 0 otherwise e.g x = 7, return y =1; x = 6 return y = 0;

9 månader ago

Solved


Summing Rows and Columns
Create a matrix y of size (n+1) whose last column's elements are the summation of the elements of all the other columns and last...

9 månader ago

Solved


Square
square root of x

9 månader ago

Solved


factorial
calculate x!

9 månader ago

Solved


Repeat elements of a vector
Repeat each elements of a given vector according to their values. * x=[1,2,1,3] * y=[1,2,2,1,3,3,3]

9 månader ago

Solved


Sum of series
a(n) = n^2 - (n-1)^2 find the summation of the series upto n i.e. a(1)+a(2)+...+a(n)

9 månader ago

Solved


Product of a and b
return the value of c = a*b

9 månader ago

Solved


Create a vector of the first n odd numbers
If n = 10, your program should return a vector y, where y = [1 3 5 7 9 11 13 15 17 19].

9 månader ago

Solved


Create a vector of n alternating ones and zeros
Given n, your output should be a vector y of numnbers such that the first number is 1 and the numbers following it alternate bet...

9 månader ago

Solved


Generate n equally spaced "intervals" between -x and x
Given n and x, return a list of numbers (in ascending order) that divides the interval [-x x] into n equal-length intervals. ...

9 månader ago

Solved


Create a vector with n repeated values of a number x
If x=3 and n=7 then the vector y would be y=[3 3 3 3 3 3 3]

9 månader ago

Solved


Create a vector of the first n naturnal numbers
If n = 7, your program should return a vector y, where y = [1 2 3 4 5 6 7].

9 månader ago

Solved


Create logarithmically spaced values
Given three numbers a,b,n with b>a, create a vector y with n logarithmic spaced values between 10^a and 10^b. Thus, if a = -2, ...

9 månader ago

Solved


Element-wise vector product
Given two vectors x and y, compute their element-wise product z. Thus, if x = [1 3 5] and y = [0.5 -1 2], then z = [1*0.5...

9 månader ago

Load more