Set x, y, z data in trimesh without re-plotting

조회 수: 1 (최근 30일)
Daniell Algar
Daniell Algar 2013년 1월 31일
Hi there,
I'm working on a function that plots a set of data continuously during mouse press. I draw the data with (in short)
tri= DelaunayTri(x, y);
h= trimesh(tri, x, y, z);
I essentially wish to update the z value upon mouse press on given (x, y), by using the set() command. My problem is that I can't seem to understand how the trimesh is built up, even though I've read the documentation. The call
>>get(h)
...
XData = [ (3 by 5972) double array]
...
etc., and I don't understand how I should pass my vector (x, y, z)-values into the
set(h, 'XData', ????)
Greatly thankful for guidance and help.
Thank you!
  댓글 수: 1
Merlin Mifsud
Merlin Mifsud 2013년 3월 15일
X = get(h, 'XData');
X = [X (new value to plot)];
set(h, 'XData', X);

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Specifying Target for Graphics Output에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by