I have a problem with creating a function contains n-dimensional independent variables with random function .. The function looks like:
where U is a random between 0 and 1
For 1-dimensional problem, it will be like:
The plot by MATLAB will be:
While, for 2-dimensional problem, it will be like:
and the plot with MATLAB will be:
The MATLAB code is:
R=1000; % steps resolution
% For 1-dimensional plotting
% For 2-dimensional plotting
I have used Maple because of its great graphics and animation, and for the mathematical analysis capability. However, to animate the above problem for 1- and 2-dimensional problems, I always fail!
My attempt has been just successed to plot 1-dimensional problem (without animation) .. And it tooks long-time with many codes!
X := Statistics:-RandomVariable(('Uniform')(0, 1));
R := Statistics:-Sample(X, 1000);
Vect := abs(Vector[column]([seq(0 .. 10, 10/999)]));
V := `~`[`-`](Vect, 5);
Mat := Multiply(V, R);
f := ArrayTools:-Diagonal(Mat);
F := abs(f);
Axis := Transpose(V);
f5 := plot(Axis, F, style = line);
And finally I got the graph:
But the problem is:
How can I animate it? Maybe I need to express it with new Maple code?
How can I plot and animate it when n=2?