
How to create a grid of squares and attribute a color to the squares like in a contour plot?
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
I want to reproduce the plots from a paper called "Fundamentals for Energy-Efficient Massive MIMO" where the author creates a 8x16 grid and gives temperature values for the contours like you can see here. The only "required" plot is (a), but it should be easy to reproduce (b) once (a) is done.
The problem is where to start with this. Can someone please point me directions?
0 comentarios
Respuestas (1)
darova
el 22 de Mzo. de 2021
Here is the idea
clc,clear
t = linspace(0,360,5)+45; % create angles
t = [t-2 t+2]; % add shifted angles
t1 = sort(t); % sorting
[x,y] = pol2cart(t1*pi/180,1); % convert to cartesian
x(x>0) = x(x>0) + 1; % move right part to right
x(x<0) = x(x<0) - 1; % move left part to left
% create surface
X = [x/10; x];
Y = [y/10; y];
Z = [x*0+1; x*0];
contour3(X,Y,Z,0:0.2:1)
surface(X,Y,Z)
view(45,45)

0 comentarios
Ver también
Categorías
Más información sobre Contour Plots en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!