Hi there, I want to find a minimum for this function:
g = 0.04 – (32*P/(9*sqrt(3)*E*MOI));
and I've written this code to do so:
clc;clear;function b = three_var(v)P = v(1);E = v(2);MOI = v(3);b = 0.04 - (32*P/(9*sqrt(3)*E*MOI));end;v = [0.12 -2.0 -0.35];a = fminsearch(@three_var,v)
but I get the error "Function definitions are not permitted in this context". I've been stuck with this for a day and don't know what to do. I would be grateful if you could help.
Best Answer