-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathfunnode.m
More file actions
24 lines (20 loc) · 777 Bytes
/
funnode.m
File metadata and controls
24 lines (20 loc) · 777 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
% FUNNODE Computes default nodes for a family of functions
% USAGE
% x=funnode(fspace);
% Returns a cell array containing d vectors or an n vector
% if the problem dimension is 1.
%
% See also: FUNDEF, FUNBAS, FUNFITF, FUNFITXY, FUNEVAL.
% Copyright (c) 1997-2000, Paul L. Fackler & Mario J. Miranda
% paul_fackler@ncsu.edu, miranda.4@osu.edu
function x=funnode(fspace)
% Determine the problem dimension
d=fspace.d;
if d==1 % a vector returned when d=1
x=feval([fspace.bastype{1} 'node'],fspace.parms{1}{:});
else % a cell array returned otherwise
x=cell(1,d);
for j=1:d
x{j}=feval([fspace.bastype{j} 'node'], fspace.parms{j}{:});
end
end