Meaning of the symbol '' \ ''

262 ビュー (過去 30 日間)
Waqas Syed
Waqas Syed 2015 年 7 月 28 日
編集済み: Bruno Luong 2021 年 10 月 1 日
Hi,
I am trying to understand a pre written matlab code. There is a line: dx = -(J \ F);
What does the forward slash mean? Does it mean F divided by J or something?

採用された回答

Lukas Bystricky
Lukas Bystricky 2015 年 7 月 28 日
編集済み: Lukas Bystricky 2015 年 7 月 28 日
That's actually a backward slash. J\F is equivalent to solving the system J dx = F for dx, where J is a matrix (probably a Jacobian) and F and dx are vectors.
  16 件のコメント
Bruno Luong
Bruno Luong 2021 年 10 月 1 日
@Walter Roberson: "So J\F vs F/J would only be the same if F and J are each real and symmetric."
Not true
J=rand(3); J=J+J',
J = 3×3
0.0670 0.8628 0.2369 0.8628 1.6893 1.1714 0.2369 1.1714 1.6260
F=rand(3); F=F+F',
F = 3×3
0.8988 0.3888 0.1346 0.3888 0.2691 0.9150 0.1346 0.9150 1.4615
J\F
ans = 3×3
-1.1987 -1.0761 -0.0648 1.3265 0.4196 -0.1101 -0.6982 0.4172 0.9877
F/J
ans = 3×3
-1.1987 1.3265 -0.6982 -1.0761 0.4196 0.4172 -0.0648 -0.1101 0.9877
Bruno Luong
Bruno Luong 2021 年 10 月 1 日
編集済み: Bruno Luong 2021 年 10 月 1 日
@Kriti Salwan "What happens if we are applying backlash to a matrix which is not square ?"
x = A\b;
Otherwise it's a least square solution
x = argmin(norm(A*x-b))
or equivalently
x = pinv(A)*b

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeElementary Math についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by