Problem with axis limits/range when using griddata
- From: "Iwan Toknow" <iwan2no_removethis_@xxxxxxxxxxx>
- Date: Thu, 18 Oct 2007 11:23:36 +0000 (UTC)
Hi,
I'm trying to plot a 3D graph using griddata but don't know
how to specify the scale/range of the axis.
Here's what I'm doing:
1. First I want to define the x and y axes. Note that both
axes should have a range from 0 to 100
[XI,YI] = meshgrid(0:0.1:100,0:0.1:100);
2. x_posns: These are the x-coordinate values and the
values range from 0 to 100, e.g. x = [70.2 0.6 8.9....].
There are a total of 100 x-coordinate values.
3. y_posns: These are the y-coordinate values and the
values range from 0 to 100, e.g. x = [46.2 19.6 39.9....].
There are a total of 100 y-coordinate values.
4. z_values: These are the z values that correspond to
certain x-y coordinates, e.g. coordinate (70.2, 46.2) might
have a z value of 1040.9 and so on.
5. Then I want interpolate the values between the values
I've specified using x_posns, y_posns and z. So I use
griddata as follows:
ZI = griddata(x_posns,y_posns,z,XI,YI,'cubic');
6. Now I want to have a 3D plot of ZI. So I do: mesh(ZI)
PROBLEM:
========
The graph that is plotted has the x-axis starting at 0 and
ending at 1000. But I need it to be from 0 to 100 in
increments of 0.1. The same problem goes for the y axis.
Note that I don't want to *cut off* the part from 100 to
1000. Instead I want the entire range from 0 to 1000 to be
0 to 100 instead.
Any solutions anyone?
Thanks!
Sam
.
- Follow-Ups:
- Re: Problem with axis limits/range when using griddata
- From: Iwan Toknow
- Re: Problem with axis limits/range when using griddata
- Prev by Date: Re: bulit in function for conversion from decimal to binary
- Next by Date: solving 10 equations with 10 unknown
- Previous by thread: Re: How to add a new property to a handle?
- Next by thread: Re: Problem with axis limits/range when using griddata
- Index(es):
Relevant Pages
|