Community Profile

photo

pign_an


Last seen: Today
787 total contributions since 2020

pign_an's Badges

  • Matrix Patterns II Master
  • Matrix Manipulation II Master
  • Magic Numbers II Master
  • Logic
  • Indexing II Master
  • Scholar
  • Card Games Master
  • ASEE Challenge Master
  • Strings I Master
  • Number Manipulation I Master
  • Matrix Patterns I Master
  • Matrix Manipulation I Master
  • Magic Numbers Master
  • Indexing I Master
  • Computational Geometry I Master

View all

Contributions in
View by

Solved


Generating random matrix with given probability mass function
Inspired by <http://www.mathworks.com/matlabcentral/cody/problems/2356-simulating-the-selection-of-a-state-with-given-probabilit...

5 hours ago

Solved


Simulating the selection of a state with given probabilities
Lets say we have 3 different states [1,2,3] with the probabilities of occurrences of each state is given as [0.5 0.2 0.3]. Which...

5 hours ago

Solved


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

22 hours ago

Solved


Unique dice configurations
Given a number of dice N and the number of sides on each die S, write a MATLAB function that will output how many unique permuta...

24 hours ago

Solved


Penny flipping - calculate winning probability (easy)
Two players are playing a fair penny flipping game. For each flip, the winner adds one penny from the loser's collection to his/...

1 day ago

Solved


Coin Tossing: Probability of Same Heads for N tosses
A pair of physicists toss a coin n times each. What is the probability that they tossed the same number of heads? *Input:*...

1 day ago

Solved


The almost-birthday problem.
This is a harder version of the birthday problem. Now, you will have to determine the probability that two or more people in a r...

1 day ago

Solved


The Birthday Phenomenon
First off, leap years are not being considered for this. In fact the year that people are born shouldn't be taken into considera...

1 day ago

Solved


Calculate the probability that at least two people in a group share the same birthday.
Calculate the probability that at least two people in a group share the same birthday. Given an integer input n, return to 0.015...

1 day ago

Solved


Evaluate the logarithmic integral
The <https://en.wikipedia.org/wiki/Logarithmic_integral_function logarithmic integral> li(x) plays a role in number theory becau...

3 days ago

Solved


Award medals to winners

3 days ago

Solved


Identify primorial primes
Cody Problems <https://www.mathworks.com/matlabcentral/cody/problems/46054-count-trailing-zeros-in-a-primorial 46054> and <https...

4 days ago

Solved


Find the last non-zero digit in a primorial
<https://www.mathworks.com/matlabcentral/cody/groups/2001/problems/45251 Cody Problem 45251> asked us to find the last non-zero ...

4 days ago

Solved


Count trailing zeros in a primorial
<https://www.mathworks.com/matlabcentral/cody/problems/44068-the-number-of-trailing-zero-digit-of-a-factorial Cody Problem 44068...

4 days ago

Solved


The number of trailing zero digit of a factorial
For given positive integer n, take factorial of that number. How many trailing zeros does it have? Example: factorial(11) = 3...

6 days ago

Solved


Identify Wagstaff primes
The numbers 3, 43, and 2731 are examples of <https://mathworld.wolfram.com/WagstaffPrime.html Wagstaff primes>. Write a func...

6 days ago

Solved


List the emirps

7 days ago

Solved


Compute the nth Pythagorean prime
Pythagorean primes have the form p = 4n+1, where n is an integer, and they can be written as the sum of squares of two integers....

7 days ago

Solved


How Far Can You Throw Something?
As you probably learned in your high school physics class, throwing an object at a 45 degree angle will give you the maximum ran...

7 days ago

Solved


Calculate the height of an object dropped from the sky
Assume that an object is dropped from 1000 meters above the surface of the earth at time t=0. The object is dropped such that t...

7 days ago

Solved


Distance of the centroids of the balls
Given *n* balls of radius *r* and the vector *p (nx3)* with all position *(x,y,z)* of the balls, return the symmetric matrix *A ...

7 days ago

Solved


Calculate compression ratio of engine
Calculate compression ratio of engine given compression volume of cylinder(Vc), piston stroke(s) and valve diameter(d)

7 days ago

Solved


Elastic Collision 001: 1-D
Elastic Collision of two particles. <http://en.wikipedia.org/wiki/Elastic_collision wiki Elastic Collision> Solve Conservat...

7 days ago

Solved


Center of mass
Given a matrix M(m,n), where m is the number of vertices of the geometrical element and n is 2 or 3 (2D-plane figure or 3D-solid...

7 days ago

Solved


center of mass
R is a given matrix with size [n,2]. R(i,:) is interpreted as the 2D-position of a mass point with mass i. Calculate the center ...

7 days ago

Solved


Determine if a four bar mechanism is of Grashof type
A four bar mechanism is composed of four links. if s is the smallest link, l the longest and p,q are the length of the other lin...

7 days ago

Solved


Find the jerk
No, it's not the author of this problem... Jerk is the rate of change in acceleration over time of an object. So, if given t...

8 days ago

Solved


Bernoulli's Equation
Bernoulli's equation states that for an incompressible fluid the following summation is constant across the flow: v^2/2 + g*z + ...

8 days ago

Solved


Mechanical Advantage of a Gear Train
Calculate the mechanical advantage of a gear train. The mechanical advantage of a gear couple is given by MA = T_o/T_i where ...

8 days ago

Solved


Energy of an object
Calculate the total mechanical energy of an object. Total Energy= Potential energy + Kinetic energy P.E.=m*g*h K.E.=1/2...

8 days ago

Load more