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:
-
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 matrixB
. -
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 vectorv2
. -
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.
See Also
Ac_ldiv_B, Ac_ldiv_Bc, Ac_mul_B, Ac_mul_Bc, Ac_rdiv_B, Ac_rdiv_Bc, At_ldiv_B, At_ldiv_Bt, At_mul_B, At_mul_Bt, At_rdiv_B, At_rdiv_Bt, A_ldiv_Bc, A_ldiv_Bt, A_mul_B!, A_mul_Bc, A_mul_Bt, A_rdiv_Bc, A_rdiv_Bt, Bidiagonal, cond, conv2, det, diag, diagind, diagm, diff, eig, eigvals, eigvecs, expm, eye, full, inv, isdiag, ishermitian, isposdef, isposdef!, issym, istril, istriu, logabsdet, logdet, lyap, norm, qrfact, rank, repmat, rot180, rotl90, rotr90, sortrows, sqrtm, SymTridiagonal, trace, Tridiagonal, tril, tril!, triu, triu!, writedlm,User Contributed Notes
Add a Note
The format of note supported is markdown, use triple backtick to start and end a code block.