piecewise function with N conditions
Mostra commenti meno recenti
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 Commenti
Matt J
il 11 Feb 2023
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
il 11 Feb 2023
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.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Number Theory in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

