How to present two streams of images on one screen simultaneously?

Dear community members

I am a vision researcher, currently using psychtoolbox3 to program my experiment, the plan is to present two streams of alternating images and textures with different frequencies simultaneously on one monitor.

To be more precise, I want the two scripts to start at the same time. I have tried parallel computing toolbox, but with little success, just wondering whether there is an easier way to program for what I intended.

e.g. ,

Right side: TextureA -> imageB -> TextureA -> imageB…

nPresentations = 10.  
       for presentationcount = 1:nPresentations    %10 rounds
            Screen('FillRect', windowPtr,[0 0 255], destinationRect_L ) % present TextureA for 1 sec
            Screen('Flip', windowPtr);
            WaitSecs(1);
            
            image = imread('imageB.jpg');       % present imageB for 0.5 second 
            texture = Screen('Maketexture', windowPtr, image);
            Screen('DrawTexture', windowPtr, texture, [], destinationRect_R);
            Screen('Flip', windowPtr);
            WaitSecs(0.4);
       end
       

Left side: imageC -> imageD -> imageC -> imageD…

nPresentations = 20
       for presentationcount = 1:nPresentations    %20 rounds
            image = imread('imageC.jpg');       % present imageC for 0.7 second 
            texture = Screen('Maketexture', windowPtr, image);
            Screen('DrawTexture', windowPtr, texture, [], destinationRect_L); 
            Screen('Flip', windowPtr);
            WaitSecs(0.7);
            
            image = imread('imageD.jpg');       % present imageD for 0.3 second 
            texture = Screen('Maketexture', windowPtr, image);
            Screen('DrawTexture', windowPtr, texture, [], destinationRect_L);
            Screen('Flip', windowPtr);
            WaitSecs(0.3);
       end

p.s. I also posted this question on mathworks, one member kindly suggested using timer callback functions, but they use a very different sets of functions, that I am having a pretty difficult time with. I was thus wondering whether there is other work around for programming rivalry experiments?

thanks in advance

Yu