Trying to look for the answer myself, I found the solution to this problem. The solution was to use only one function, and generate manually all points using a function that I defined myself, then to append all points to the koolplot function. The code looks like this:
My user defined function:
double ts_f_ln_c(double x, double tension_surface_cmc, double cmc, double pc20)
{
/*all variables declarations and constants calculations*/
if(x < log(cmc/1000.0)/2.303)
{
if(x < -pc20)
{
y = /*something of minus inverse type*/;
}
else
{
y = /*something of linear type */;
}
}
else
{
y = /*something constant*/;
}
return y;
}
And the koolplot part in my main:
/**kooplot graph of function with three different expressions**/
plotdata x, y;
clear(x);
clear(y);
for(i = 0 ; i < 1000 ; i ++)
{
x_graphe[i] = 0.0;
y_graphe[i] = 0.0;
x_graphe[i] = log(cmc/1000.0)/2.303 - 4.5 + 6.0 / 1000.0 * i;
y_graphe[i] = ts_f_ln_c(x_graphe[i], tension_surface_cmc, cmc, pc20);
}
insert(x, x_graphe, 1000);
insert(y, y_graphe, 1000);
axesBotLeft(x, y, log(cmc/1000.0)/2.303 - 4.5, 20);
axesTopRight(x, y, log(cmc/1000.0)/2.303 + 1.5, 80);
plot(x, y);
So I consider this topic as SOLVED :)