How can I change the variable (z) by any other variable such as (w) in the figures?

조회 수: 2 (최근 30일)
Aisha Mohamed
Aisha Mohamed 2023년 3월 13일
답변: Cameron 2023년 3월 13일
When I plot this figure and I want to show some points on it, I have got the varibles for example (x=-0.645, y=0.585 and z= -0.6363). But I used the variable (z) in the functions $f_{b}^{-}$ and other functions and I do not want it appear in the figures but I want to change it by other variable. My question is
How can I change the variable (z) by any other variable such as (w) in the figures?

답변 (1개)

Cameron
Cameron 2023년 3월 13일
[X,Y] = meshgrid(1:0.1:10);
Z = sin(X) + cos(Y);
p = surf(X,Y,Z,'EdgeColor','none');
p = surf(X,Y,Z,'EdgeColor','none');
p.Parent.View = [0 90];
p.DataTipTemplate.DataTipRows(3).Label = 'W';
dt = datatip(p,5,5);

카테고리

Help CenterFile Exchange에서 Graphics Object Properties에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by