How to plot gradient bar in MATLAB

7 ビュー (過去 30 日間)
Kim
Kim 2017 年 2 月 28 日
回答済み: KSSV 2017 年 2 月 28 日
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 Center および File ExchangeMATLAB についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by