scatterplot3d solution

Hello, i made scatterplot 3d
that calculation was y=2.3x^2-1.5u+10.5
x = rep(c(-5:5),each=11)
u = rep(c(-5:5),times=11)
y = 2.3x^2-1.5u+10.5
scatterplot3d(x,u,y)

is it a right caculation way?
Help me please
Thanks

Besides the lack of the * operator, it is right in the sence that it doesn't produce an error.

x = rep(c(-5:5), each = 11)
u = rep(c(-5:5), times = 11)
y = 2.3 * x^2 - 1.5 * u + 10.5
y
#>   [1] 75.5 74.0 72.5 71.0 69.5 68.0 66.5 65.0 63.5 62.0 60.5 54.8 53.3 51.8 50.3
#>  [16] 48.8 47.3 45.8 44.3 42.8 41.3 39.8 38.7 37.2 35.7 34.2 32.7 31.2 29.7 28.2
#>  [31] 26.7 25.2 23.7 27.2 25.7 24.2 22.7 21.2 19.7 18.2 16.7 15.2 13.7 12.2 20.3
#>  [46] 18.8 17.3 15.8 14.3 12.8 11.3  9.8  8.3  6.8  5.3 18.0 16.5 15.0 13.5 12.0
#>  [61] 10.5  9.0  7.5  6.0  4.5  3.0 20.3 18.8 17.3 15.8 14.3 12.8 11.3  9.8  8.3
#>  [76]  6.8  5.3 27.2 25.7 24.2 22.7 21.2 19.7 18.2 16.7 15.2 13.7 12.2 38.7 37.2
#>  [91] 35.7 34.2 32.7 31.2 29.7 28.2 26.7 25.2 23.7 54.8 53.3 51.8 50.3 48.8 47.3
#> [106] 45.8 44.3 42.8 41.3 39.8 75.5 74.0 72.5 71.0 69.5 68.0 66.5 65.0 63.5 62.0
#> [121] 60.5

Created on 2019-12-13 by the reprex package (v0.3.0.9000)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.