Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clear all
- clc
- n = 100000;
- vo = [];
- teste = [];
- for i = 1:n
- v1 = 0.02 + (2*rand-1)*0.008;
- v2 = 4.95 + (2*rand-1)*0.008;
- t1 = 27 + (2*rand-1)*2.01;
- t2 = 42 + (2*rand-1)*2.01;
- t = 30 + (2*rand-1)*2.01;
- voi =((v1-v2)/(t1-t2))*t + v1 - ((v1 - v2)/(t1-t2))*t1;
- vo = [vo ;voi];
- % round((i/n)*100,2);
- end
- vom = mean(vo)
- histogram(vo)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement