How to get rid of sign() in diff() results?
Mostra commenti meno recenti
I have a symbolic function. diff() produces the result with sign(). The next derivative has dirac() in it. Is there a way to get rid of sign() in the diff() result?
Risposta accettata
Più risposte (1)
Image Analyst
il 6 Giu 2021
Not sure what you mean because you did not give any examples, but if you want the differences to always be positive, you can pass the results of diff() into abs():
d = abs(diff(v));
4 Commenti
Paul
il 6 Giu 2021
The code as written is differentiating the magnitude of the transfer function wrt to R1? If you don't mind me asking, what is the purpose of this operation?
Or is it really intended to differentiate the amplitude of the frequency response of the transfer function wrt to R1?
Valeri Aronov
il 6 Giu 2021
Modificato: Valeri Aronov
il 6 Giu 2021
Paul
il 6 Giu 2021
I read the post. Sill not clear to me that the intent is to get the derivative of H(s) wrt R1 or if the goal is to get the derivative of abs(H(jw)) wrt R1.
Valeri Aronov
il 6 Giu 2021
Modificato: Valeri Aronov
il 27 Giu 2021
Categorie
Scopri di più su Assumptions 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!

