GNU 八度图
我在 GNU Octave 上绘制了一个关于振动的简单速度与时间图,我想知道时间为 1 和 10 秒时的确切值。我对此不太确定,请帮助我。
I have plotted a simple velocity against time graph about vibration on GNU Octave and I would like to know the exact values when the time is 1 and 10s. I'm not very sure on this, please help me on this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只要您的时间数组
t
包含这些精确值,并假设您的速度数组为v
,您就可以使用v(find(sum(t==[ 1 10].')))
并根据需要将尽可能多的值放入括号内的向量中。
如果
t
没有这些精确值,例如t = [0 0.9 10.1]
,请查看unique
函数的智能使用,网址:此页面https://www.mathworks.com/matlabcentral/answers/375710-find-nearest-value-to-specific-number
As long as your time array
t
contains those exact values, and assuming your velocity array isv
, you could usev(find(sum(t==[1 10].')))
and put as many values into that bracketed vector as you need.
If
t
doesn't have those exact values, liket = [0 0.9 10.1]
, check out the intelligent use of theunique
function at this pagehttps://www.mathworks.com/matlabcentral/answers/375710-find-nearest-value-to-specific-number