MATLAB: Defining a symbol to perform a specified operation

perform a function symbol

Is there a way, for example, given two numbers a and b I can either use a function or define a symbol, say %, such that a%b = (a*b)/(a+b)?

Best Answer

Aleem - I think the easiest approach would be to create a function. It would take the a and b as inputs, the function body would be your above equation, and the output parameter would be the result. Is there a reason why you want to create a function rather than just writng the above where needed?
Related Question