フィルターのクリア

Variations between Division Operations

2 ビュー (過去 30 日間)
Sam
Sam 2014 年 2 月 9 日
編集済み: Matt J 2014 年 2 月 9 日
When performing a normal division and a Element-wise Division on a vector the outputs are different..
a = [1 2 3 4 5 6 7 8 9 10];
a = a';
d = 1 / a;
d = 1 ./ a;
In this case since i am dividing 1 against a Column vector the normal one gives me a solution but only evaluates the last segment and the element wise operation works as fine.
Why is the normal division working in this case? should it not prompt me an error? In a more complicated cases it randomly evaluates a certain row in the column vector and it is the only available solution where the rest are given as '0'.

採用された回答

Matt J
Matt J 2014 年 2 月 9 日
編集済み: Matt J 2014 年 2 月 9 日
The operation d=1/a is giving you a least squares solution, d, to the equation
d*a=1

その他の回答 (0 件)

カテゴリ

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

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by