Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Untitled
a guest
Dec 15th, 2017
60
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
text
0.18 KB
| None
|
0
0
raw
download
clone
embed
print
report
r = rand(100)
a_hat = ones(100);
a_hat[find(r <= p_2)] = 2
a_hat[find(r > p_2 && r <= p_3)] = 3
votes = zeros(3)
for n=1:100
votes[a_hat[n]] += 1
end
action = indmax(votes)
Add Comment
Please,
Sign In
to add comment
Public Pastes
MQTT-induction
Lua | 8 min ago | 3.07 KB
turtleapi
Lua | 13 min ago | 1.85 KB
MQTT-turbine
Lua | 15 min ago | 3.13 KB
peta_web
Bash | 17 min ago | 0.50 KB
🤑 G2A.com Free Gift Card Guide Apr 2024 FIX 🤑
GetText | 28 min ago | 0.38 KB
🤑 G2A.com Free Gift Card Guide Apr 2024 FIX 🤑
GetText | 37 min ago | 0.39 KB
MQTT-boiler
Lua | 41 min ago | 3.32 KB
MQTT-reactor
Lua | 41 min ago | 3.83 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!