Trying to plot the surface and contour plot (surfc) of the temperature distribution of a 1x1 metal plate that goes from (0,0) to (1,1), while it's heated to 100 degrees C on the corner (1,1). THANK YOU!!
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
SnoopingPoppet
el 29 de Nov. de 2016
Comentada: Rena Berman
el 28 de Sept. de 2017
%% Declarations x = linspace(0,1); y = linspace(0,1);
[xG,yG] = meshgrid(x,y);
T = 100*(exp((-0.1)*((xG-1)^2)))*(exp((-0.3)*((yG-1)^2)));
%% Calculations
%% Plotting surfc(xG,yG,T)
2 comentarios
Stephen23
el 21 de Sept. de 2017
@Snooping Poppet: it is not appreciated when you edit away the text of your question. Imagine if everyone did that, then this entire forum would be useless for anyone else as it would only consist of thousands of threads all reading "This post was taken down". Would you find that useful?
By deleting your question you unilaterally decided that Mischa Kim's volunteered time helping you shall not be useful to anyone else. Does Mischa Kim get a say in this decision? Do you think this is why we volunteers come here and write our advice and comments?
If you want a consulting service then you will find plenty of them on them internet. This is a community forum with answers provided by volunteers.
Respuesta aceptada
Mischa Kim
el 30 de Nov. de 2016
Brandon, use
x = linspace(0,1); y = linspace(0,1);
[xG,yG] = meshgrid(x,y);
T = 100*(exp((-0.1)*((xG-1).^2))).*(exp((-0.3)*((yG-1).^2)));
surfc(xG,yG,T)
Note the periods in front of the * and ^ operators in the equation for T. They are used for element-wise operations (e.g. multiplication).
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Fluid Dynamics 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!