Dear
I want to know the value of Z from the surfc function
That is when I give the value of x, y
It gives me the value of z
surfc (x, y, z)102W.jpg

 채택된 답변

Star Strider
Star Strider 2019년 12월 7일

0 개 추천

I do not have the function you used to create the surface in your Question.
Try this with it:
[X,Y] = ndgrid(-2.5:0.1:2.5); % Independent Variable Grid
Z = sin(X).^2 + cos(Y); % Dependent Variable (Use Your Function)
x_room = 1; % X-Room Coordinate
y_room = -1; % Y-Room Coordinate
z_room = griddata(X,Y,Z, x_room, y_room); % Interpolated Z-Room Coordinate
figure
surfc(X, Y, Z)
hold on
plot3(x_room, y_room, z_room, 'rd', 'MarkerFaceColor','r', 'MarkerSize',10)
hold off
grid on
Substitute your function for mine, and choose whatever you want for the coordinates (providing they are within the specified x and y limits).

댓글 수: 3

abdullah qasim
abdullah qasim 2019년 12월 7일
thank you
abdullah qasim
abdullah qasim 2019년 12월 7일
you are solve my problem
thank you very much
Star Strider
Star Strider 2019년 12월 7일
As always, my pleasure!

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

추가 답변 (1개)

darova
darova 2019년 12월 6일

0 개 추천

  • I want to know the value of Z from the surfc function
Here is it
123.PNG

댓글 수: 1

abdullah qasim
abdullah qasim 2019년 12월 7일
I mean when I give any point in the room (x,y) already the vlue of z appere

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

카테고리

질문:

2019년 12월 6일

댓글:

2019년 12월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by