Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions