How to code this mathematical (tensor) formula in Matlab
5 ビュー (過去 30 日間)
古いコメントを表示
Hi, i'm looking to code this tensor notation formula into matlab:
X = e.n - [n.e.n]n
where n is a unit vector, e is a 3x3 tensor (strain), and "." represents a dot product.
My initial code is the following:
X = e_tensor*n - n*transpose(e_tensor*n)*n
However, i am not able to recreate the results of the paper i am reading.
Is it possible my matlab code doesnt correctly represent the tensor formula?
Any help would be greatly appreciated.
Thanks,
Tyler
0 件のコメント
回答 (1 件)
Walter Roberson
2015 年 11 月 29 日
"*" is not the dot product.
X = dot(e_tensor, n) - dot(n, transpose( dot(e_tensor, n) )) * n
However, I do not see where the transpose is coming from, and the meaning of [something]n is not described.
Also, your e_tensor is 3 x 3 and your n is a unit vector. The MATLAB dot product is only defined between arrays (or vectors) that are the same size.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!