Finding each maximum and minimum value of a sinusoidal function
显示 更早的评论
How do you find each of the maximum and minimum points of a sinusoidal function without using built into tool boxes and prefereable no loops.
Thank you,
回答(1 个)
Star Strider
2019-2-9
0 个投票
That depends on the sinusiodal function and your constraints.
Use the max function to find the first maximum and its index, the min function to find the first minimum and its index. Those are going to be separated by π radians, so with a bit of calculation (and the associated time they occur) you then know the period and frequency, and can calculate the phase.
You should be able to take it from there to find the other maxima and minima.
类别
在 帮助中心 和 File Exchange 中查找有关 Lidar Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!