How can I plot a 2D plot from a 3D plot?

1 visualización (últimos 30 días)
Laura Monreal
Laura Monreal el 27 de Sept. de 2016
Comentada: Laura Monreal el 29 de Sept. de 2016
Hello,
I am using the next code to plot the temperature colors in a 2 Dimensional geometry using the pdeplot
if true
figure;
pdeplot(model,'xydata',u(:,end),'contour','on');
axis auto
title (sprintf('Temperature at Final Time (%g seconds)',tfinal))
xlabel 'x (m)'
ylabel 'y(m)'
end
Do you know how I can extract 2D plot from there? I would like to plot 1 dimension vs temperature.
Thank you very much in advance,
L

Respuesta aceptada

KSSV
KSSV el 27 de Sept. de 2016
when you run this model, the required output variables are stored in workspace. They are structures, the desired result can be extracted from here.
  1 comentario
Laura Monreal
Laura Monreal el 29 de Sept. de 2016
Hi Siva,
Thank you very much for your answer. It is useful, but still when I am looking at the "u" matrix in the workspace, I do not get how columns and rows are structured, so I guessed that last column (u(:,end)) is the u value in the hole geometry at the last time but how it is expressed? When I plot it, it has a weird shape to me. I would like to extract u(:,end) at the surface of my geometry for example but I am just not sure how to do it.
Thank you
L

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by