I have imported two .mat files from Matlab. One containing the x coordinates and another y of a curve at different instants. So the .mat files are matrix and each row belongs to coordinates at a given time. I am planning to make a movie in Mathematica using the Table command because Matlab movies are of poor quality and there is no way for antialiasing in Matlab.
I am using these on mathematica
X = Import["X.mat"];
Y = Import["Y.mat"];
Do[xx = X[[1, i]];
yy = Y[[1, i]];
data = Transpose@{xx, yy};
c[i] = ListPlot[data], {i, 1, 10, 1}];
I want to then put all the listplot in a table and generate an animation.
As an example: Suppose you have two matrices A and B given as: A = [1 2 3;4 5 6;7 8 9]; and B = [10 20 30;40 50 60;70 80 90]
Suppose the entry's of each row are points. I mean (1,1) (2,20) and so on are points. And each row belongs to some instant of time. So at every instant of time I have three points plotted on a figure. My question is how to combine the plots (3 in this case) in order to get a movie. What should be the right loop which does these:
- Selects values from the matrix A and B
- Then creates 3 points.
- Plots them.
- Combine the figures in a table or so for a movie.
I know that my loop construct is not correct. But I am at a loss that how I should do it. I have never used loops or arrays in Mathematica before. Please suggest how I should proceed. Thanks in advance.