Borrar filtros
Borrar filtros

How do I draw contours on multiple surfaces so that they line up

13 visualizaciones (últimos 30 días)
Rowan
Rowan el 17 de Jul. de 2024 a las 15:59
Comentada: Voss el 18 de Jul. de 2024 a las 13:07
I have a 3D plot of a 7 2D curves with 6 surfaces drawn so that tthey connect them. Im looking to draw contours on this figure but the only useful comand I can find is
>> contour3([k1;k2], [x1;x2], [z1;z2], 25, 'color', 'k', 'linewidth', 0.1)
where x1 and z1 are the data for my first curve and k1 is used to determine its position in 3D by fixing it. The problem im having is that the command is drawing 25 contours evenly spaced from the maximum value and minimum value out of z1 and z2 causing it to missmatch with 3rd set of contours as z2 has a much greater maximum value compared to z3 and z4. How can i go about creating contours that wont have this problem? The plot with out contours and a plot with contours along with it rotated can be seen below. Hopefully the images illustrates the problem with mismatching contours. Many thanks in advance.

Respuesta aceptada

Voss
Voss el 17 de Jul. de 2024 a las 16:06
Maybe specifying a vector of contour levels, rather than the number of levels, is appropriate. For example:
lev = 0.01:0.01:0.08;
contour3([k1;k2], [x1;x2], [z1;z2], lev, 'color', 'k', 'linewidth', 0.1)

Más respuestas (0)

Categorías

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

Productos


Versión

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by