Question: Write a function called event that simulates the scenerio below. The function should have no inputs and a single output that must be either 0

 Write a function called event that simulates the scenerio below. The

Write a function called event that simulates the scenerio below. The function should have no inputs and a single output that must be either 0 or 1 A class of 4 girls and 3 boys is told to line up and do so randomly. Simulate the students lining up and have your function return as an output the value of 1 if the students line up girl, boy, girl, boy, girl, boy, girl pertectly. Your function should return a 0 otherwise Hint: See the function randperm Your Function Reset MATLAB Documentation 1 function out-event Code to call your function C Reset 1This script calculates the approximate probability for j-1:100 5 end 6 100+(cnt/1000) 2 cnt-0; cnt cnt+event

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!