I am trying to write some code in Matlab(2016a).I have a 28x1 matrix library.I have data that I found as a result of the calculations I made. These are in the form of a 595x1 matrix. I want to match each data in the data with the data in the library and output the matching data to the screen. The number of columns is equal, but the number of rows is not.The data I found and the data in the library are not exactly the same. So the data found is 59.2 but the number in the library is 60. I need to be able to match that way. The ismember function didn't work here. It should be something more like min(abs(lib-data)). Then I have to do another operation with each of the matching values (minVal) I find. For example, for each minVal,
if En < minVal - s
value = (En - (minVal-s)) / s
end
If you could help with this situation, I would greatly appreciate it.