Plotting a colored surface in 2D
Show older comments
Dear experts,
I have two vectors: x and y, and a function u(x,y) representing the temperature in the point (x,y). I want to see different temperatures as different colors, in the XY plane (see an example in the attached picture). i.e.- u will be given as color in the XY plane.
Will someone please help me understand what is the appropriate method to use in order to obtain such a plot?
Thanks in advance
Accepted Answer
More Answers (3)
Abdullah Talib
on 14 Nov 2018
you can also use
imagesc(x,y,u); colormap jet; axis xy;
2 Comments
yogendra jaiswara
on 2 Oct 2022
Nice
Yinghui Hu
on 18 Aug 2023
it is a great help. Just what I would like to have!
Vijendra Singh
on 21 Dec 2020
0 votes
syms x y y=sin(x) ezplot(x,y)
Gul Rahman Abdulrahimzai
on 18 Nov 2022
0 votes
0 <= x <= 1
3 <= y <= 4
z=a(〖xy)〗^0.7 cos(ax)
Create plot. Use function surf
a=input ('a = ');
[x,y]= meshgrid(0:0.1:1,3:3.5:4);
z = a*exp(x*y)^0.7*cos(x*a);
surf(x,y,z);
What is the problem with this model plz
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!