Index exceeds matrix dimensions using fsolve
显示 更早的评论
I am writing this simple matlab code and it is not running at all
function F = position4(x)
F(1) = 40*cos(50* (pi/180)) + 100* cos(x(2)* (pi/180)) - x(1) ;
F(2) = 40*sin(50* (pi/180)) + 100 * sin(x(2)* (pi/180));
guess = [120, 17];
fsolve(@position4,guess )
end
1 个评论
Jan
2018-2-20
Please post the inputs, how you call it and a copy of the complete error message. Otherwise trying to help you require too much guessing, what the problem is. It is strange, that you call fsolve from within the function you provide as handle.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!