0
$\begingroup$

I have a problem fitting a $N\times N$ ($32\times 32$ in this case) matrix in Matlab.

Here is the deal enter image description here

I have this image, and I want to create 1 dimensional fit between the points and then be able to interpolate it in order to make it smoother.

Does anyone have any idea if that can be done?

$\endgroup$
  • $\begingroup$ Welcome to SciComp.SE. It is not clear to me what you want to do. You have a matrix with real numbers and you want to compute a 1D interpolation of these values?? That sounds odd. Unless, and judging for your image, you wan to find an interpolation function for the "different" points in your matrix, i.e., points that are different from the background. $\endgroup$ – nicoguaro Jul 8 '15 at 18:29
  • $\begingroup$ You are almost right. Ok so essentially what i need is if you imagine a curve just passing trough that pretzel kind of shape. Now the thing is the shape can be arbitrary but it is always going to be continuous. So it can be a circle or a spiral or something else. So as I said imagine you play connect the dots and you connect only the ones which you can see right now. Then I have a way of using the line segments to do what I need. But I need the curve so I can use it as a sort of trajectory. $\endgroup$ – Mike Jul 8 '15 at 20:13
  • $\begingroup$ P.S. The whole idea is that afterwards I am going to know which elements of the matrix I need and as I have a way of filling the data I will be able to generate the same shape with higher precision. $\endgroup$ – Mike Jul 8 '15 at 20:20
  • $\begingroup$ You should edit your question then. You're not saying that in the text. In essence, you don't even have an $N\times N$ matrix. $\endgroup$ – nicoguaro Jul 8 '15 at 20:55
  • $\begingroup$ Uh sorry I might have made it a bit unclear. But about the matrix - the fit will always be performed on a square matrix $\endgroup$ – Mike Jul 8 '15 at 21:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.