Search
New Code
Softros LAN messenger 9.2
GetOrgChart 2.5.2
Alvas.Audio 2018.0
Bytescout PDF Viewer SDK 9.0.0.3079
SecureBridge 8.2
Magento Language Translator 1.0
Australia Post Shipping For Magento 1.0
Excel Add-in for SQL Server 1.7
ODBC Driver for BigCommerce 1.3
Excel Add-in for SQLite 1.7
SentiVeillance SDK Trial 6.0.183849
dotConnect for Dynamics CRM 1.7
Entity Developer 6.3
dbForge Documenter for Oracle 1.0
dbForge Data Generator for Oracle 2.0
Top Code
Output Messenger 1.8.0
Aliexpress Clone- Ec21 Script 1
Indiegogo Clone 3.0
Advanced MLM Software 1.2
Online Food Ordeing System 1.0
PHP Image Resize Script 1.0
Best Spotify Clone 1.0
Get Random Record Based on Weight 1.0.0
PHP Point of sale 10.0
Travel Portal Script 9.29
Excel Add-in for Bigcommerce 1.6
Magento Product Designer 1.0
OFOS - Just Eat Clone Script 1.0
PrestaShop Upload Images Module 1.2.1
Trading Software 1.2.4
Code Listing by samil

Code 1-1 of 1   






Solution to birthday probability problem: If there are n people in a classroom, what is the probability that at least two of them have the same birthday?
General solution:
P = 1-365!/(365-n)!/365^n
If you try to solve this with large n (e.g. 30, for which the solution is 29%) with the factorial function like so:
P = 1-factorial(365)/factorial(365-30)/365^30
Matlab will output NaN because Matlab tries to compute very...