Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Matlab code and function
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Could you please explain to me the following Queistions: If I have:
f(x)=-2x^2+Lx
Constraints x is in the feasible set [0,L/2] If the question is: give df/dx= -2x + L;
- write a function that numerically solves df/dx = -4x+ L=0
- how to solve df/dx = 0; directly use the solution x*=L/4.
- Finally how can I find max {f(0),f(x*),f(L/2)}
1 comentario
Image Analyst
el 28 de Abr. de 2017
I cannot explain the difference between -2x + L and -4x+L unless it's just a typo you made. I suggest you ask your instructor.
Otherwise use linspace(0 to make up a vector of x values, and use the max() function. You might use inputdlg() to ask the user for the L value, and the starting and stopping value of x. http://www.mathworks.com/matlabcentral/answers/8626-how-do-i-get-help-on-homework-questions-on-matlab-answers
Respuestas (0)
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!