About summing of anonymous function
Mostrar comentarios más antiguos
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?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre 関数の基礎 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!