BaşlayınÜcretsiz Başlayın

Scaling Different Axes

Suppose that you wanted to transform a two-dimensional vector so that the first element doubled in size, while the second element was cut by a third.

You can do this with matrix multiplication, as the matrix A, which yields the R output:

     [,1]      [,2]
[1,]    2 0.0000000
[2,]    0 0.6666667

achieves the desired result.

Bu egzersiz

Linear Algebra for Data Science in R

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Multiply A by the vector c(1, 1). Print the result.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Multiply A by the given vector
print(___ ___ ___)
Kodu Düzenle ve Çalıştır