What is the command for calculating expectation in MATLAB?

Part of my project is to use MATLAB to verify the correctness of the hand calculations, I'm attempting to verify Problem 3 of the project but I can't seem to find a way to calculate "Expectation" in MATLAB. Attached I have included the instruction portion to show what the professor is asking. Any help would be appreciated, thanks!

 Accepted Answer

As a hint, generally, expectation and mean are terms with a similar meaning. Is there a function in MATLAB to compute a mean?

More Answers (0)

Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!