About summing of anonymous function
显示 更早的评论
Hi. I'm using matlab on my research at the university and an optimization protocol which is fmincon function. Although I make the formula like, y =@(x)(x(1)+1)^2 + (x(2)+5)^2, as my research progresses, the formula will be much longer and complex. So I'd like to dismantle this function like y1=@(x)(x(1)+1)^2 + (x(2)+5)^2; y2=@(x)(x(3)+21)^2 + (x(4)+10)^2; after that , connect them like y = y1 + y2;
I tried this, but failed. Do you know how to deal with it?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 関数の基礎 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!