Plotting Two .mat Files

I am trying to plot two .mat files using a function that was previously made. The function is used to plot only one set of .mat files data. Thus, in each figures it represents only one set of data. My intention is to use two sets of data and plot it in the same figures, if possible figure (1) and figure (2). So the data that will be plot would be the 'NouMovement0001.mat' and the other one is 'NouMovement0002.mat'. In the 3D plot, I should be able to distinguish between these datas by color coding it like for example in the figure (2) right?

Please let me know as I am trying to figure out how to actually plot these two sets of .mat files datas. Do I have to redefine to combine both datas or is there another way to plot this.

fileName = 'NouMovement0001';

curDir = pwd;

Data = load_qualisys_mat(curDir, fileName);

Markers = Data.Markers ;

figure(1)

iFrame = 1000 ;

Fields = fieldnames(Markers) ;

draw_stick_picture(Markers,Fields,iFrame,'xyz', 'ko')

axis equal

grid on

figure(2)

plot(Markers.RAnkle(:,3), 'b') ; hold on

plot(Markers.LAnkle(:,3), 'r') ;

As you can see, there are two figures, I am grateful if any of you able to guide me at least one of them. The first figure is a 3D graph and the load_qualisys_mat is the function that was made prior to this.

Direct link to this comment

Still not easy to guess what you are trying to do. I think we need to be able to run your code, so please upload load_qualisys_mat.m and draw_stick_picture.m plus any functions used by those functions.

Direct link to this comment

Thank you so much for anwering this question. Indeed this looks like the one that I've been looking for. Which is to plot and compare between two sets of data. Hope you had a great time with family during Christmas. God bless.