Ashwini Kumar Rao
12BM60047
Creating a two matrices and using them for matrix binding
z1<-c(1:9)
z1<-c(1,2,3,4,5,6,7,8,9)
dim(z1)<-c(3,3)
z2<-c(1:9)
z2<-c(32,5,15,48,10,18,1,12,23)
dim(z2)<-c(3,3)
x<-z1[,3]
y<-z2[,1]
z3<-cbind(x,y)
Assignment 2:
Multiplication of matrices
Using the matrices created in the first assignment
z3<-z1%*%z2
z3
Assignment 3:
Regression of nse data and residuals calculation
nse<-read.csv(file.choose(),header=T)
open<-nse[,2]
high<-nse[,3]
reg<-lm(high~open,data=nse)
reg
residuals(reg)
Assignment 4: Normal Distribution Plot
x<-seq(-8,8,length=200)
y<-dnorm(x,mean=0,sd=1)
plot(x,y,col="orange")




No comments:
Post a Comment