summaryrefslogtreecommitdiff
path: root/src/Scilab2C/FunctionTableManagement/AddElementaryFunction.sci
blob: 4851ba662d0ccf4606cdc07153c979d79306b8ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
function TreeOut = AddElementaryFunction(FunctionName,TreeIn)
// This function returns a tree starting obtained from the input 
// tree (TreeIn) to which the elementary function "FunctionName" has
// been added.

disp('   --> Adding the elementary function: '+FunctionName);
[FuncStruct, CINFO, NumFunc] = GenerateLeafElementary(FunctionName);

TreeOut = TreeIn;
for ind = 1 : NumFunc, 
   TreeOut = AddBranch(TreeOut, FuncStruct(ind), CINFO(ind) );
end

endfunction