How to code this mathematical (tensor) formula in Matlab

조회 수: 5 (최근 30일)
Tyler
Tyler 2015년 11월 28일
답변: Walter Roberson 2015년 11월 29일
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

답변 (1개)

Walter Roberson
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.

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by