Hi all,
Notice that in order to use the dropbox you need to log into the course website with your
HID (there is a login button at the top right). Once you are logged in, all registered
students should be able to access their dropbox folder.
If you are registered and can?t access the dropbox please send us an email with your
problem set and let us know how and when you registered for the class, it may well be the
case that registration is delayed in which case we don?t have you on our list yet.
In any case, please do not post your solutions to the class-email list!
Thanks,
The teaching team
From: gov2001-l-bounces at
lists.fas.harvard.edu [mailto:gov2001-l-bounces at
lists.fas.harvard.edu] On Behalf Of Joerg Orgeldinger
Sent: Wednesday, February 13, 2008 2:02 PM
To: gov2001-l at
lists.fas.harvard.edu
Subject: [gov2001-l] The dropbpx did not give me access!
Task 1:
a) Build a vector (with for 7 elements)
c (1,2,3,4,7,8,6) ->x
Calculate the mean
sum (x)/length (x)
same results as
mean(x)
c (1,2,3,4,7,8,6) ->x
sum (x)/length (x)
mean(x)
-------------------------------------------------------------------------
b)
c (1,2,3,4,7,8,6) ->x
sort(x)
(length (x) +1)/2->z
x[z]
in matlab
function m = median(v, n) % Subfunction
% Calculate median.
w = sort(v);
if rem(n, 2) == 1
m = w((n+1) / 2);
else
m = (w(n/2) + w(n/2+1)) / 2;
end
-------------------------------------------------------------------------------
Task 2:
a)
mat <- matrix(0:0, nrow=100, ncol=100)
x.stat <- rep (0,100)
for (i in 1:100){
y<-sample (1000,100)
a <- matrix(y, nrow = 100, ncol = 100) }
b)
daten <- matrix(runif(10000),100,100)
par(mfrow=c(5,5))
for (nummer in 1:25 ) { hist(daten[, nummer])}
_____
<http://uk.rd.yahoo.com/evt=51524/*http:/de.mobile.yahoo.com/interstitial?refer=e00127%0a>
E-Mails jetzt auf Ihrem Handy...