Question: please write this code in c++ and run it and show output please with code close all; clear all; clc; HeadsNumberof =0:5; probabilityofhead=0.5 NumberofTrials=5 pdf
close all; clear all; clc; HeadsNumberof =0:5; probabilityofhead=0.5 NumberofTrials=5 pdf binopdf(HeadsNumberof, NumberofTrials, probabilityofhead); \% Plot pdf with bars of 1 width. figure bar(HeadsNumberof, pdf, 1) ylabel(['Probability of Densitive Function' ]) xlabel('\# of Heads in 5 Flips of Cone') figure (2) plot (HeadsNumberof, pdf, '.') ylabel([ Probability of Densitive Function' ]) xlabel('\# of Heads in 5 Flips of Cone')
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
