function result=electresults ( ) cellarray = { 'al' 'bush' ; % Alabama 'ak' 'bush' ; % Alaska 'az' 'bush' ; % Arizona 'ar' 'bush' ; % Arkansas 'ca' 'gore' ; % California 'co' 'bush' ; % Colorado 'ct' 'gore' ; % Connecticut 'de' 'gore' ; % Delaware 'dc' 'gore' ; % District of Columbia 'fl' 'bush' ; % Florida 'ga' 'bush' ; % Georgia 'hi' 'gore' ; % Hawaii 'id' 'bush' ; % Idaho 'il' 'gore' ; % Illinois 'in' 'bush' ; % Indiana 'ia' 'gore' ; % Iowa 'ks' 'bush' ; % Kansas 'ky' 'bush' ; % Kentucky 'la' 'bush' ; % Louisiana 'me' 'gore' ; % Maine 'md' 'gore' ; % Maryland 'ma' 'gore' ; % Massachusetts 'mi' 'gore' ; % Michigan 'mn' 'gore' ; % Minnesota 'ms' 'bush' ; % Mississippi 'mo' 'bush' ; % Missouri 'mt' 'bush' ; % Montana 'ne' 'bush' ; % Nebraska 'nv' 'bush' ; % Nevada 'nh' 'bush' ; % New Hampshire 'nj' 'gore' ; % New Jersey 'nm' 'gore' ; % New Mexico 'ny' 'gore' ; % New York 'nc' 'bush' ; % North Carolina 'nd' 'bush' ; % North Dakota 'oh' 'bush' ; % Ohio 'ok' 'bush' ; % Oklahoma 'or' 'gore' ; % Oregon 'pa' 'gore' ; % Pennsylvania 'ri' 'gore' ; % Rhode Island 'sc' 'bush' ; % South Carolina 'sd' 'bush' ; % South Dakota 'tn' 'bush' ; % Tennessee 'tx' 'bush' ; % Texas 'ut' 'bush' ; % Utah 'vt' 'gore' ; % Vermont 'va' 'bush' ; % Virginia 'wa' 'gore' ; % Washington 'wv' 'bush' ; % West Virginia 'wi' 'gore' ; % Wisconsin 'wy' 'bush' } % Wyoming result = cell2struct (cellarray, {'state', 'candidate'}, 2) end