X-Received: by 10.224.72.199 with SMTP id n7mr44150120qaj.5.1357794031724;
        Wed, 09 Jan 2013 21:00:31 -0800 (PST)
 09 Jan 2013 21:00:31 -0800 (PST)
Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!p13no2340222qai.0!news-out.google.com!k2ni5538qap.0!nntp.google.com!p13no2340218qai.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: comp.soft-sys.matlab
Date: Wed, 9 Jan 2013 21:00:31 -0800 (PST)
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=160.75.144.207;
 posting-account=jK1ZXgoAAACyh8MsXxnm1W9Uc8BAFTLC
NNTP-Posting-Host: 160.75.144.207
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6002b0cd-7374-4249-93be-aa8bd880eb04@googlegroups.com>
Subject: Error using ==> griddata3 at 51..................... METHOD must be
 one of 'linear', or 'nearest'.
From: "Mark L. J." <abejohno@gmail.com>
Injection-Date: Thu, 10 Jan 2013 05:00:31 +0000
Content-Type: text/plain; charset=ISO-8859-1
Lines: 50
Xref: news.mathworks.com comp.soft-sys.matlab:786299

hello 
good day to you all

please could someone please guide me on how to solve this error. thanks so much for the time.

Below is the code. I really want to plot a function with 4 variables.


X = gallery('uniformdata',[5000 1],0)-1;
A = gallery('uniformdata',[5000 1],1)-1;
B = gallery('uniformdata',[5000 1],2)-1;
C = gallery('uniformdata',[5000 1],3)-1;

F= 1.10471*(X.^2).*A + 0.04811*B.*C.*14.0 + A ;


%%Define a regular grid, and grid the data to it:
d = -0.8:0.05:0.8;
%[xi,yi,zi] = meshgrid(d,d,d);
[Xi,Ai,Bi,Ci] = ndgrid(d,d,d,d);

w = griddata3(X,A,B,C,F,Xi,Ai,Bi,Ci);
%[X,A] = ndgrid(-2:.2:2, -2:.2:2); 
%[X,A,B,C] = ndgrid( -2:.2:2, -2:.2:2); 



% Since it is difficult to visualize 4-D data sets, 
% use isosurface at 0.8:

p = patch(isosurface(Xi,Ai,Bi,Ci,w,0.8));
isonormals(Xi,Ai,Bi,Ci,w,p);
set(p,'FaceColor','blue','EdgeColor','none');
view(3), axis equal, axis off  camlight, lighting phong 


%F= 1.10471*X^2*A +0.04811*B*C*(14.0 + A);
%% F= X.^2*A + B.*C.*(14 + A);
%% mesh(F)
mesh(F)



...............

?? Error using ==> griddata3 at 51
METHOD must be one of 'linear', or 'nearest'.

Error in ==> testndgrid3 at 14
w = griddata3(X,A,B,C,F,Xi,Ai,Bi,Ci);