# At_rdiv_Bt

At_rdiv_Bt(A, B)

For matrices or vectors \$A\$ and \$B\$, calculates \$Aáµ€ / Báµ€\$

## Examples

Here are some examples and common mistakes for the `At_rdiv_Bt` function in Julia:

1. Divide two matrices:

``````julia> A = [1 2; 3 4]
2×2 Array{Int64,2}:
1  2
3  4

julia> B = [5 6; 7 8]
2×2 Array{Int64,2}:
5  6
7  8

julia> At_rdiv_Bt(A, B)
2×2 Array{Float64,2}:
0.2       0.428571
0.428571  0.666667``````

This example calculates the element-wise division of the transpose of matrix `A` and the transpose of matrix `B`.

2. Divide two vectors:

``````julia> v1 = [1, 2, 3]
3-element Array{Int64,1}:
1
2
3

julia> v2 = [4, 5, 6]
3-element Array{Int64,1}:
4
5
6

julia> At_rdiv_Bt(v1, v2)
3-element Array{Float64,1}:
0.0666667
0.266667
0.6``````

This example calculates the element-wise division of the transpose of vector `v1` and the transpose of vector `v2`.

3. Handle division by zero:

``````julia> A = [1 2; 3 4]
2×2 Array{Int64,2}:
1  2
3  4

julia> B = [0 0; 0 0]
2×2 Array{Int64,2}:
0  0
0  0

julia> At_rdiv_Bt(A, B)
2×2 Array{Float64,2}:
Inf  Inf
Inf  Inf``````

When dividing by zero, the result is `Inf` (infinity).

Common mistake example:

``````julia> v = [1, 2, 3]
julia> At_rdiv_Bt(v, 4)
ERROR: MethodError: no method matching At_rdiv_Bt(::Array{Int64,1}, ::Int64)``````

In this example, the second argument `4` is not a matrix or vector. The `At_rdiv_Bt` function expects both arguments to be matrices or vectors. Ensure that the inputs are of the correct type to avoid this error.