- I then want to solve this graph to find the coordinates that gives the minimum value of Cost
3d plot and optimization
11 次查看(过去 30 天)
显示 更早的评论
I am attempting to plot a mesh 3D graph that displays how Cost varies with t, T and P. I then want to solve this graph to find the coordinates that gives the minimum value of Cost. This is the equation relation time, pressure, temperature to cost:
C = (t/60) + (0.18*(T-1073)*(t/3600)) + (1.75*(P/6894.76)*(t/3600));
This is the code I currently have and it doesn't seem to work
T=1073:1:1223;
t=1418.4:86.54:14400;
P=533984.04:4254.16:1172108.74;
[tm,Tm,Pm] = meshgrid(t, T, P);
C = (tm./60) + (0.18.*(Tm-1073).*(tm./3600)) + (1.75.*(Pm./6894.76).*(tm./3600));
figure(1)
mesh(t,T,P,C)
grid on
xlabel('t')
ylabel('T')
zlabel('P')
1 个评论
darova
2019-12-2
What about min function?
回答(1 个)
Alan Weiss
2019-12-2
It is hard to plot a function of three variables. For some approaches, see Plot 3-D Solutions and Their Gradients (this uses PDE Toolbox, but you don't need to have PDE Toolbox to understand or use the plotting ideas).
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Geometry and Mesh 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!