Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
How to get 1807 point data array to 1806 data array?
1 visualizzazione (ultimi 30 giorni)
I thought the process would go with interpolation like the following but not
u = interp1(u, size(u) - 1);
which gives me `NaN [integer]`, so wrong.
I do not want to lose the accuracy of the results but I need to compare the vector with its original vector which has one point less.
Guillaume il 24 Ott 2016
As Marc says, you need a vector for the query points but his solution for generated that vector does not make much sense.
A good way of generating one less query point than the original is to use linspace:
uq = interp1(u, linspace(1, numel(u), numel(u)-1))
That's assuming that the original u correspond to x = 1:numel(u).