Assignment -2
1.Cbind taking two matrices
Command
z1<- c(1,2,3,4,5,6,7,8,9)
z2<- c(11,22,33,44,55,66,77,88,99)
dim(z1)<-c(3,3)
dim(z2)<-c(3,3)
x<-z1(,3)
y<-z2(,1)
cbind(x,y)
2. Multiplication of two matrices
Command
z1%*%z2
3. Regression of NSE Index data of 1st dec 2012 to 31st dec 2012
Data
Command
z<- read.csv(file.choose(),header="T")
zreg<-lm(Open~High,data=z)
4. Normal Distribution
Command
x<-seq(0,200)
> y<- dnorm(x,mean=100,sd=20)
> plot(x,y)
> plot(x,y,type="l")

No comments:
Post a Comment