how to find the nearest value (if a value is already provided) from a given array?
1 次查看(过去 30 天)
显示 更早的评论
I want to find the nearest value of x in the array m
x=0.61;
m=linspace(0,1,9);
We know the nearest value is 0.6250, but i would like a code to do this for me, for any value of x.
0 个评论
采纳的回答
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Get Started with Aerospace Blockset 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!