Defining a symbol to perform a specified operation
조회 수: 1 (최근 30일)
이전 댓글 표시
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
채택된 답변
Geoff Hayes
2020년 4월 20일
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?
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Assumptions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!