help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using otpiminterp in octave


From: Ben Abbott
Subject: Re: Using otpiminterp in octave
Date: Tue, 07 Oct 2014 08:30:44 -0400

On Oct 7, 2014, at 8:09 AM, Zilore Mumba <address@hidden> wrote:

> The data I used is as in the attached file
> 
> Just to be sure I read in the data as per lines below:
> 
> % load the data file
> data=load('meansr.txt');
> 
> % the 1st and 2nd column represent the location
> x = data(:,1);
> y = data(:,2);
> % the 3rd column represents the observations to interpolate
> obs = data(:,3);
> 
> 
> The output I get has no similarity with the input. Am not sure if am printing 
> the error field.
> 
> On Mon, Oct 6, 2014 at 11:21 PM, Doug Stewart <address@hidden> wrote:
> 
> 
> On Mon, Oct 6, 2014 at 1:01 PM, Zilore Mumba <address@hidden> wrote:
> I have just installed octave on ubuntu. Trying the example 
> "example_optiminterp_data.m" with my own data, I get very strange values 
> (very small values) see extract of output below
> 
> # Created by Octave 3.8.1, Mon Oct 06 17:02:39 2014 CAT <address@hidden>
> # name: fi
> # type: matrix
> # rows: 41
> # columns: 41
>  -6.046732358407388e-147 -2.165934319425287e-147 -7.689701072432262e-148 
> -2.705909551864099e-148 -9.437495202085344e-149 -3.262419987996825e-149 
> -1.117796281402676e-149 -3.795990593671885e-150 -1.277695255495584e-150 
> -4.262546577144117e-151
> 
> Here is the line I added for the output
> save mydata.txt fi;
> 
> suspect am not printing the correct results.
> I apologise for this very basic question
> Help will be appreciated
> Zilore Mumba

The ranges for (x,y) and (xi,yi) do not overlap.

min (x)
ans =  23.100
max(x)
ans =  33.200
min (y)
ans = -17.800
max (y)
ans = -8.9000

[xi,yi] = ndgrid(-2:0.1:2,-2:0.1:2);

Try adding

 xi = median (x) + xi;
 yi = median (y) + yi;

Ben






reply via email to

[Prev in Thread] Current Thread [Next in Thread]