How can I match a value on a matlab plot?
显示 更早的评论
I have identified the first peak value in my dataset. I'd like to know the first x-value at the point at which this peak y-value occurs again. Any suggestions? p
采纳的回答
更多回答(1 个)
SRT HellKitty
2018-1-11
Say you have data with peaks for the Y-Axis and linear data for the X-Axis
Y = [1:5,1:5,1:5];
X = [1:15];
Now you have 3 peaks in Y, when it equals 5. If you want to know what value of X is when Y is equal to 5 you could do a logical index;
X_at_peaks = X(Y == 5);
That would show that X is 5, 10, and 15 when Y is equal to 5.
2 个评论
Julia de Lange
2018-1-11
编辑:Julia de Lange
2018-1-11
SRT HellKitty
2018-1-11
If voltage is exactly 1.4147 another time in the data, do the logical indexing with respect to time
Peaks = time (Voltage == 1.4147)
类别
在 帮助中心 和 File Exchange 中查找有关 Descriptive Statistics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!