From: Richard on
Hi, I'm having difficulty with the interp1 command. Just don't get it! I've a set(actually very many sets) of values in an array with x and y coordinates 5. I want to interpolate and generate data with a resolution of 1. My data is of the form:
0 0 avalue
5 0 avalue
10 0 avalue
..
..
0 5 avalue
5 5 avalue
10 5 avalue
15 5 avalue
avalue is an electric field strength and I need to generate the filed values at the points
1 0 newval
2 0 newval
3 0 newval
4 0 newval
...
and so on
How do I implement this with interp1
From: Matt J on
"Richard " <REMOVETHISrcaldwellie(a)yahoo.com> wrote in message <i3ujjg$pfu$1(a)fred.mathworks.com>...

> How do I implement this with interp1

=======

You don't. You use interp2 (since your data are samples of a 2D function f(x,y))
From: Jan Simon on
Dear Richard,

> My data is of the form:
> 0 0 avalue
> 5 0 avalue
> 10 0 avalue
> .
> .
> 0 5 avalue
> 5 5 avalue
> 10 5 avalue
> 15 5 avalue

Do I understand correctly: You have several different values for 0 ?!
What is the first and waht is the second column in your data?

Kind regards, Jan
From: Richard on
"Jan Simon" <matlab.THIS_YEAR(a)nMINUSsimon.de> wrote in message <i3ukp0$bm8$1(a)fred.mathworks.com>...
> Dear Richard,
>
> > My data is of the form:
> > 0 0 avalue
> > 5 0 avalue
> > 10 0 avalue
> > .
> > .
> > 0 5 avalue
> > 5 5 avalue
> > 10 5 avalue
> > 15 5 avalue
>
> Do I understand correctly: You have several different values for 0 ?!
> What is the first and waht is the second column in your data?
>
> Kind regards, Jan
Hi Jan, my data is of the form
x y field_strength
where x and y are coordinates in 2d space. I have a 400metre X 400 metre area but only have data for every 5th point(i.e. 5 metre resolution)
From: Matt J on
"Richard " <REMOVETHISrcaldwellie(a)yahoo.com> wrote in message <i3uqku$r35$1(a)fred.mathworks.com>...

> x y field_strength
> where x and y are coordinates in 2d space. I have a 400metre X 400 metre area but only have data for every 5th point(i.e. 5 metre resolution)
=================

Like I said,

interp2(0:5:400,0:5:400, field_strength, 0:400,0:400);