Plotting a contour plot with excel data

10 visualizaciones (últimos 30 días)
asd ad
asd ad el 12 de Ag. de 2020
Comentada: asd ad el 13 de Ag. de 2020
Hello everyone,
I want to plot a contour plot with the attached excel data. So the colour bar on the right needs to be the RH. The x axis is basially the first column L which is relative to R1......R13. For exaomple 1*R, 2*R. The different initial R should be on the y-axis. How do I best do this?
Thanks in advance

Respuesta aceptada

Sudheer Bhimireddy
Sudheer Bhimireddy el 12 de Ag. de 2020
doc readmatrix
Import your data into a 2D array and then decide what columns you want to plot using contourf
  12 comentarios
Sudheer Bhimireddy
Sudheer Bhimireddy el 13 de Ag. de 2020
Ah, now I understood your data.
Try this:
data = xlsread('Book2.xlsx');
R = data(1:14,16); % <- Got your R
% Initialize matrices
L = zeros(21,14);
R1 = zeros(21,14);
RH = zeros(21,14);
for i = 1:size(L,1)
L(i,:) = (i-1)*R;
R1(i,:) = R;
RH(i,:) = data(i,14);
end
contourf(L,R1,RH);
c=colorbar;
xlabel('L');ylabel('R');ylabel(c,'RH');
asd ad
asd ad el 13 de Ag. de 2020
Thank you for your help :)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Contour Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by