I want to create a 'if' for a probability
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Nicholas Mathison Aba
am 24 Nov. 2021
Beantwortet: Voss
am 24 Nov. 2021
How would I write that the prbability that I eat carrots this year knowing that I ate carrots last year is of 80%. And that the probabilities that I eat carrots this year knowing I didnt eat carrots last year is of 40%. Could you please help me out with this?
0 Kommentare
Akzeptierte Antwort
Voss
am 24 Nov. 2021
ate_carrots_last_year = false;
if ate_carrots_last_year
P_eat_carrots_this_year = 0.8;
else
P_eat_carrots_this_year = 0.4;
end
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Power and Energy Systems finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!