pdegrad, Matlab, more output data than input

Hello,
I have a problem with the command pdegrad.
[ux,uy] = pdegrad(points,tri,dat);
dat and the mesh parameters comme form an other code that I download on Matlab.
Assume that the variable dat has N elements, points has N number of elements and tri has "t number of elements. Then, after computation of pdegrad the number of element of ux and uy will be t, because the gradient of u is evaluated at the center of each triangle. That's my problem, why it doesn't conserve the same length than dat, in other words compute the grad on each nodes. Because after, I need the product between ux and dat.
Thank you a lot for your help.
B.Y
Ps: You should know that computation of pdegrad gives the expected result

답변 (1개)

Alan Weiss
Alan Weiss 2016년 6월 15일

0 개 추천

To get the values at the node points use pdeprtni.
Alan Weiss
MATLAB mathematical toolbox documentation

카테고리

태그

질문:

2016년 6월 15일

답변:

2016년 6월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by