Skip to content

Instantly share code, notes, and snippets.

@guysoft
Created January 22, 2013 15:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guysoft/4595400 to your computer and use it in GitHub Desktop.
Save guysoft/4595400 to your computer and use it in GitHub Desktop.
Calculate a quick an dirty prediction for vote percentage in Israel 2013 elections
clear all
y1973= [21.8 33.1 41.4 54.1 65.2 73.4 78.6]'
y1977= [16.8 31.3 42.4 50.6 60.2 71.4 79.2]'
y1981= [17 30.2 39.4 47 57 69.6 78.5]'
y1984= [15.6 29.8 39.8 47.2 55.6 68.9 78.8]'
y1988= [14.8 29.3 42.1 52.9 65.2 75.6 79.7]'
y1992= [14 27.5 38.4 47 56.3 68.2 77.4]'
y1996= [14.3 28.9 41.3 50.6 60 70.9 79.3]'
y1999= [14.2 28.9 41.7 51.8 60.9 71.4 78.7]'
y2003= [10.1 24 35.3 44.2 52.8 62.8 67.8]'
y2006= [9.9 21.7 30.9 39 47 57 63.2]'
y2009= [10.3 23.4 34 41.9 50.3 59.7 65.2]'
y2013= [11.4 26.7 38.3 46.6]'
oldvotes=[y1973, y1977,y1981, y1984,y1988,y1992,y1996,y1999,y2003,y2006,y2009]'
time= [10 12 14 16 18 20 22]
time2= [10 12 14 16 ]
clf
hold all
for i=1:11
bar(time,oldvotes(i,:))
end
plot(time2,y2013)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment