piecewise function with N conditions
이전 댓글 표시
I'm trying to achieve the construction of a second maximum logic function f using symbolic expressions/functions : I want f(X) to yield the 2nd highest input Xi with X = [X1, ... , XN] .
my problem resides in the N-dependant number of conditions (I figured i couldn't use "piecewise()" ?) and the fact I'm having trouble using "maxk()" in symbolic expressions/functions.
Also, I'm using symbolic functions because I need the partiate derivatives of f.
Even if you don't have the answer, ideas and leads are very welcome !
댓글 수: 2
Matt J
2023년 2월 11일
It's a bit hard to imagine why this would be useful, since you already know the result it would lead to is going to have a highly complex symbolic form at best. The point of using symbolic math is to try to arrive at simple expressions for things, because if it is not simple, non-symbolic processing is always going to be more efficient.
Walter Roberson
2023년 2월 11일
The derivative of a min() or max() function is not continuous. Indeed, on discrete inputs, the derivative is not defined. You would need to have the inputs be expressions in free variables for a derivative to have any meaning.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Number Theory에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

