surface fixed point value Z
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
abdullah qasim
am 6 Dez. 2019
Kommentiert: Star Strider
am 7 Dez. 2019
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](https://www.mathworks.com/matlabcentral/answers/uploaded_files/253121/102W.jpeg)
![102W.jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/253121/102W.jpeg)
0 Kommentare
Akzeptierte Antwort
Star Strider
am 7 Dez. 2019
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 Kommentare
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Multirate Signal Processing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!