How to extract state values of function slewrate() / Get Upper state values bimodal waveform
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello,
The builtin function slewrate() indicates in a plot the upper state and the lower state levels. However, I could not find a parameter on how to extract those values. I mean, if the plot shows those values, it should be possible to get them as a value..
Or maybe there is another function/method ? I have a square waveform with overshoot (both on the high and low side) and want to get the settled values from top and bottom.
댓글 수: 0
답변 (1개)
Sumukh
2024년 7월 31일
Hi Jemp.
The “slewrate” function has few name-value pair arguments that can be passed into it, as per the following documentation:
One such name-value pair is for passing “StateLevels” argument. If nothing is passed here, the “slewrate” function uses states estimated by the “statelevels” function, which uses a histogram method to estimate the state levels of given bilevel waveform. You can try out the following line of code to get the state levels:
levels = statelevels(y) % y should be declared before running this.
The “levels” variable is a 1x2 vector that has the lower and upper state levels of given bilevel waveform in variable “y”. Please refer to the following documentation for further understanding:
I hope this solves the issue.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!