how to call a function in the main code to applicate it wiyh different variables?

hi, i have a function :
function F=soleval(SV,coutl,couth,it_max)
.
.
.
F=sum(sum(coutl(k1,e1))*tabaffes(k1,e1))+sum(sum((couth(e1,e2))*(1-y(e1,e2))));
by calling this function in the main code ,i want to have the result of:
F
F(e1,e2)
F(e1,k1)
can you help me please?

1 Comment

Is F computing a symbolic expression? If not then F will be a definite value and then the only way it would make sense to talk about F(e1,e2) would be if e1 and e2 are array subscripts into the array F.

Answers (0)

This question is closed.

Asked:

on 15 May 2012

Closed:

on 19 Dec 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!