Community Profile

photo

PurpleDiab


Last seen: 5 meses ago

hhh

1.101 total contributions since 2016

Contact

PurpleDiab's Badges

  • Cody5 Easy Master
  • Matrix Patterns I Master
  • Computational Geometry I Master
  • Scholar
  • Tiles Challenge Master
  • Indexing I Master
  • Indexing II Master
  • ASEE Challenge Master
  • CUP Challenge Master
  • Solver

View details...

Contributions in
View by

Solved


Initialize a Natural Number matrix.
Given length of matrix initialize a matrix consisting of natural numbers from 1 to n: n = 10; x = [ 1 2 3 4 5 6 7 8 9 10]; ...

5 meses ago

Solved


Remove All elements less than 5
Given an input vector x, remove all elements of x less than 5 . Example: Input x = [ 1 2 5 7 3 ] Output y is [ 5 7 ...

5 meses ago

Solved


Spherical Volume
Calculate the volume of a sphere.

5 meses ago

Solved


Pi Estimate 2
Estimate Pi as described in the following link: <http://www.people.virginia.edu/~teh1m/cody/Pi_estimation2.pdf>

5 meses ago

Solved


Pi Estimate 1
Estimate Pi as described in the following link: <http://www.people.virginia.edu/~teh1m/cody/Pi_estimation1.pdf>

5 meses ago

Solved


Create the following sequence : 0 1 1 4 9 25 64 169 ...
The sequence 0, 1, 1, 4, 9, 25, 64, 169, ... represents the square of the sequence of Fibonacci numbers. Let n repres...

5 meses ago

Solved


Bit calculation
Give me the count of numbers from 1 to n having their last two bits as 0. For example function y = ret_count(4) y = x...

5 meses ago

Solved


Mysterious digits operation (easy)
What is this digit operation? 0 -> 0 1 -> 9 121 -> 9 44 -> 6 15 -> 5 1243 -> 7 ...

5 meses ago

Solved


How brilliant are you?
A Brilliant number is defined as a number with two prime factors, both of which have the same number of digits. Some examples: ...

5 meses ago

Solved


Highest powers in factorials
This is the inverse of the problem <https://www.mathworks.com/matlabcentral/cody/problems/44747 Exponents in Factorials>. Inste...

5 meses ago

Solved


Pseudo Square Root (Inspired by Project Euler 266)
Shamelessly copied from the Project Euler page for Problem 266: ------------- The divisors of 12 are: 1,2,3,4,6 and 12. T...

5 meses ago

Solved


Don't be mean. Be nice!
For this problem, you will be given a range of single digits R, and a separate number K. You job is to calculate the mean of al...

5 meses ago

Solved


Circular Primes (based on Project Euler, problem 35)
The number, 197, is called a circular prime because all rotations of the digits: 197, 971, and 719, are themselves prime. The...

5 meses ago

Solved


Create numeric palindromes and their square roots
Given a number n (1<=n<=9), return a left justified numeric matrix p with all the palindromes of the form 1 to n and back to 1. ...

5 meses ago

Solved


Strange Number Algorithms
Three integer numbers will be provided to you. Write a function to Step1: Multiply first number by 3. Step2: Add 6 with t...

5 meses ago

Solved


is the number happy?
test is a given integer number is Happy of not? answer 1 if yes or 0 is no

5 meses ago

Solved


Consecutive Powers
Return 2 numbers and 2 powers such that their difference is 1 A 4 element row vector is expected: x where x(1)^x(2) - x(...

5 meses ago

Solved


Is this number Munchhausen Narcissistic?
In this problem, simply return 1 if a supplied number is Munchhausen narcissistic or 0 if not. Example 153 is narcissistic...

5 meses ago

Solved


Can I make a right triangle ?
Input(a) - is vector with any amount of values. Interpreted as legths of sides. Output(b): * Is true if there are any 3 va...

6 meses ago

Solved


Create matrix with Gray code
Output "g" should be a matrix of class double, with <http://en.wikipedia.org/wiki/Gray_code Gray reflected binary code>. Inpu...

6 meses ago

Solved


Volume and area of a sphere
Input(r) - radius Output([v,s]) - volume and area

6 meses ago

Solved


Vector Magnitude Calculator
'a' is a vector that starts at the origin and ends at (x, y). Find ||a||. Hint: It is as simple as "ABC".

6 meses ago

Solved


Divisible by 14
Write a function to determine if a number is divisible by 14. If a number is <http://www.mathworks.com/matlabcentral/cody/proble...

6 meses ago

Solved


Divisible by 15
Write a function to determine if a number is divisible by 15. If a number is <http://www.mathworks.com/matlabcentral/cody/proble...

6 meses ago

Solved


Sphenic number sequence
<http://oeis.org/A007304 Sphenic numbers> are positive integers that are products of three distinct prime numbers: 30, 42, 66, 7...

6 meses ago

Solved


Long-digit Subtraction
Suppose you need to subtract a very large integer from another integer. <http://www.mathworks.com/matlabcentral/cody/problems/56...

6 meses ago

Solved


Mersenne Primes vs. All Primes
A Mersenne prime (M) is a prime number of the form M = 2^p - 1, where p is another prime number. <https://www.mathworks.com/matl...

6 meses ago

Solved


Pattern Sum
Write a function which receives two single digit positive integers, (k and m) as parameters and calculates the total sum as: k...

6 meses ago

Solved


Simple Matrix
Make the following matrix without typing it in one by one. [1 2 3; 2 4 6; 4 8 12] x=[1 2 3].

8 meses ago

Solved


Problem for beginners
M is a nxm matrix. Swap the fist and the second last column with eachother. X=[1 2 3;4 5 6;7 8 9] Y=[2 1 3;5 4 6;8 7 9]

8 meses ago

Load more