How to plot gradient bar in MATLAB

9 次查看(过去 30 天)
How to draw the above gradient bar?

采纳的回答

KSSV
KSSV 2017-2-28
x = [0.5 1 1.5] ;
y = linspace(0,200) ;
[X,Y] = meshgrid(x,y) ;
Z = X+Y ;
figure(1)
surf(X,Y,Z) ;
colormap(jet) ;
shading interp ;
view(2)
x = [0.5 1 1.5] ;
y = linspace(0,200) ;
y(y>80 & y<120) = NaN ;
[X,Y] = meshgrid(x,y) ;
Z = X+Y ;
figure(2)
surf(X,Y,Z) ;
colormap(jet) ;
shading interp ;
view(2)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by