dot in an expression
古いコメントを表示
Hi guys. What does the dot in sinc(x) = sin(x)./x do? Remove a singularity or what?
回答 (1 件)
David Fletcher
2021 年 4 月 15 日
編集済み: David Fletcher
2021 年 4 月 15 日
1 投票
Element by element division
5 件のコメント
Robert Bag
2021 年 4 月 15 日
David Fletcher
2021 年 4 月 15 日
編集済み: David Fletcher
2021 年 4 月 15 日
It could be a matrix - if you applied the sin function and x was a matrix it would apply sin(x) to each value in the matrix, but the way sin is applied is not fundamentally different whether x is a scaler, a vector, or a matrix, whereas x.*y is a fundamentally different method of application than x*y (element by element multiplication as opposed to matrix multiplication). In your example the dot indicates element by element division as opposed to matrix right division which is used to solve linear equations
Robert Bag
2021 年 4 月 15 日
Robert Bag
2021 年 4 月 15 日
Compare the following
x = magic(3)
sin(x)/x % matrix division
sin(x)./x % element-wise division
Additional reference: https://www.mathworks.com/help/matlab/matlab_prog/array-vs-matrix-operations.html
カテゴリ
ヘルプ センター および File Exchange で Hypothesis Tests についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!