|
From: | Terry Duell |
Subject: | Re: Interpolation problem |
Date: | Sat, 24 Mar 2012 13:21:20 +1100 |
User-agent: | Opera Mail/11.61 (Linux) |
On Sat, 24 Mar 2012 13:19:37 +1100, Martin Helm <address@hidden> wrote: [snip]
I think you want Xnz = find(y); Yy = interp1(Xnz, y(Xnz), 1:1012, 'linear') find gives you back the index values of the non zero elements, y(Xnz) gives you the corresponding values and you want to interpolate on the index set of a 1012 elements vector which is the finite sequence 1:1012.
Yes, that does what I wanted. Thanks for your help. Cheers, -- Regards, Terry Duell
[Prev in Thread] | Current Thread | [Next in Thread] |