How to plot gradient bar in MATLAB
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/161156/image.png)
How to draw the above gradient bar?
0 comentarios
Respuesta aceptada
KSSV
el 28 de Feb. de 2017
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 comentarios
Más respuestas (0)
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!