SHARE
TWEET

Untitled

a guest Oct 23rd, 2019 65 in 335 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #1
  2.  
  3. a <- seq(-5,15,by=0.1)
  4.  
  5. sum(a[a<0])
  6.  
  7.  
  8.  
  9. #2
  10.  
  11. m <- c(3, -4, 5, -6, 7, 12, 5, 3, -7)
  12. matrica <- matrix(m,nrow=3,ncol=3,byrow=TRUE)
  13.  
  14. det(matrica)* solve(matrica)
  15.  
  16.  
  17. #3
  18.  
  19. m1 <- c(-5, 7, 8, 6, -3, -1, 4, 2)
  20. m2 <- c(2, 3, 1, -5, 7, 6, 0, 😎
  21.  
  22.  
  23. matrix(m1,nrow=4,ncol=2,byrow=TRUE)
  24. matrix(m2,nrow=4,ncol=2,byrow=TRUE)
  25.  
  26. m1-(5*m2)
  27.  
  28. (t(m2))*m1
  29.  
  30.  
  31. #4
  32.  
  33.  
  34.  
  35.  
  36. Seatbelts
  37.  
  38. help("Seatbelts")
  39.  
  40. #nr1. Kiek zmoniu zuvo ar stipriai susizeide patekus
  41. #i avarija nuo 1969 iki 1984 metu D.Britanijoje
  42.  
  43. #nr2. 10 kintamuju, is ju 8 kiekybiniai
  44.  
  45.  
  46.  
  47. #5
  48.  
  49. pdf("Kreives.pdf")
  50.  
  51. x<-seq(-3,3)
  52. y<-9-x^2
  53. y=function(x) 9-x^2
  54.  
  55. #a
  56.  
  57. curve(y, from=-3, to=3, lty=1, lwd=2, main="pirma kreive")
  58. y1<-2*x+3
  59. lines(x,y1, type="l", lty=2, col="green")
  60.  
  61. #b
  62.  
  63. y=function(x) 9-x^2
  64. curve(y, from=-4, to=4, lty=1, lwd=2, main="antra kreive")
  65. points(4,4, pch=1, col="red", cex=2)
  66.  
  67. dev.off()
  68. #6
  69. jpeg("Sinus.jpeg")
  70. par(mfrow=c(1,2))
  71. x<- seq(-2*pi,4*pi)
  72. y<-sin(2*x)
  73.  
  74. #6a
  75. plot(x,y,col="brown", type = "s", main="Ruda")
  76.  
  77. #6b
  78. plot(x,y,col="blue", type = "o", main="Melyna")
  79. dev.off()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top