|
> Hi,
> if I have a function, for example,
> f(t) = 6*t*t*t + 4*t*t + 3*t + 1,
> t is in [0.0, 1.0]
> May I use ImageJ to draw the function plot?
> Thanks!
You can plot a function using a macro, for example,
n = 100;
xpoints = newArray(n);
ypoints = newArray(n);
xmax = 1;
xinc = xmax/n;
x = 0;
for (i=0; i<n; i++) {
xpoints[i] = x;
ypoints[i] = f(x);
x += xinc;
}
Plot.create("Function", "t", "f(t)", xpoints, ypoints);
exit;
function f(t) {
return 6*t*t*t + 4*t*t + 3*t + 1;
}
-wayne
|