Defining a symbol to perform a specified operation
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Aleem Andrew
le 20 Avr 2020
Commenté : Aleem Andrew
le 20 Avr 2020
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)?
0 commentaires
Réponse acceptée
Geoff Hayes
le 20 Avr 2020
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?
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Assumptions dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!