add additional parameter to contour plot to generate 3d plot
Mostrar comentarios más antiguos
I have an equation which has 3 unknown variables V, s, and T. I want to produce a contour plot that shows what happens when each of these variables changes. Currently I can do this by creating a vector for both V and T but keep s as a constant:
V = 1:250;
T = linspace(1,25,length(V));
s = 30;
for j = 1:length(T)
D(j,:) = (3.*V.*(s^2))./(T(j).*((T(j).^2)-...
(3.*T(j).*s)+(3.*(s.^(2)))));
end
Then by plotting D as a contour plot:
pcolor(T,V,D');shading interp
we can see that when V is large and T is small, D will be large. From here, I would like to generate a 3d plot where I can also show the influence of changing 's'. At the moment 's' is a constant, so I can show how s affects the outcome by producing say 4 different figures for 4 different values of s. However, it would be better if I could generate one plot with 3 axis showing how D varies with V, T, and s. Could anyone provide some information about the best way of doing this?
Respuesta aceptada
Más respuestas (1)
Thorsten
el 18 de Feb. de 2013
You can use scatter3 and experiment with the size and the color of the dots
scatter3(X(:), Y(:), Z(:), 100*map01(V(:))+0.1, 255*(map01(V(:))), 'filled')
Categorías
Más información sobre Contour Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!