Matlab Sir James the Wise is a brave and noble knight Each d

(Matlab) Sir James the Wise is a brave and noble knight. Each day he rides out with his sword, lance, and shining armour to seek adventure in the halls of the Mathematics Department. On each day there is 5 probability that Sir James will rescue a princess, there is a 2% probability that Sir James will slay a dragon, and a 93% probability that he simply has a cup of tea and goes home again without rescuing a princess or slaying a dragon.

Solution

ans.)

1. y == [5 2 93 ]

prob_y = arrayfun(@(x)length(find(y==x)), 5/ 12

this can find probabilty in given year.

2. y == [5 2 93 ]

prob_y = arrayfun(@(x)length(find(y==x)), 93/100

(Matlab) Sir James the Wise is a brave and noble knight. Each day he rides out with his sword, lance, and shining armour to seek adventure in the halls of the M

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site