fcontour error: not enough input arguments
Mostrar comentarios más antiguos
I have an objective function:
function thetadot = giant(x)
thetadot = -sqrt((((45*-9.8*(x(1)+x(2)))*((0.5*4410*(x(2).^2))/(45*-9.8*(x(1)+x(2)))))-(0.5*4410*(x(2).^2))-(0.5*45*((4*pi*sqrt(0.01-x(2).^2)).^2))/(0.5*45*((x(1)+x(2)).^2))))
which I'd like to optimize. I'm trying to plot it to visualize before I continue with constraints. I keep getting the error: Not enough input arguments when plotting fcontour(giant). Any help is appreciated.
Respuesta aceptada
Más respuestas (1)
Steven Lord
el 4 de Mayo de 2018
0 votos
What requirements does the documentation for the fcontour function say it has for the function you pass into it as the first input argument F?
"The function must accept two matrix input arguments and return a matrix output argument of the same size."
Does your function satisfy the requirements? As written, it does not. Your function seems to assume that it will be called with a vector with two elements.
Categorías
Más información sobre 2-D and 3-D 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!