matlab - Using fgoalattain -
i'm trying use matlab goal seek solution , in process, display iterations.
i've setup simple example follows:
cf = [10,20,30,40]; options = optimset('display', 'iter'); fgoalattain(@(r) sum(cf)/r - 50, 0.1, 0, 1, [], [], [], [], [], [], [], options);
matlab doesn't show iterations. can replace "options" "asdasdasd" , doesn't complain. answer matlab returns 6522 when should 2 (sum(10,20,30,40)/r - 50 == 0).
can please kindly point out i'm doing wrong?
Comments
Post a Comment