Thanks for the tutorial. I also watched your tutorial about VideoReader. I am trying to read then write an MP4 file, but I always find the output file compressed if compared to the original one. Do you know how to make Matlab write the video with the same spec of the the original one?
Sorry for the late reply - which image do you mean by the code animation? Some of these I can share, others are a bit more difficult for me to give. Thanks!
Hi ANALOG TecHII ! I guess it depends on what you mean by 'how'. The video figures are generated as described in the video - frame by frame saving. The video itself was recorded with OBS (a streaming software that happens to do excellent screen recording in addition to broadcasting), and I edited it with lightworks (which I don't really recommend - I would switch if I wasn't already invested in it's UI). And hey, who doesn't want more friends, right? :)
Is it possible to animate particles within a reactor reacting and forming products? The idea here is that the reactants will have a different colour to product particles.
If you have a spatial coordinate set and particle identity, then yes, that can be done. Generating the particular coordinates and velocities over time may be a bigger issue mind you. Several of my examples in the opening sequence involved this. The best approach is to make a function that shows what you are interested in at one instant in time, and then repeatedly call this function to generate the frames. I'd suggest making a simpler toy model first to build out your tooling first.
@@CodingLikeMad Ah, so say if I didn't want to animate the particles but instead have a colour gradient against the length of the tube. ie, if initial reactant colour is red and blue, then at z=0 where they enter, the colour would be red and blue. But towards the end of the tube once the reactants have reacted to form say yellow, then the tube would be yellow assuming full conversion. The idea is that I want to tie the colours to their concentration values. ie if reactant red drops to 0 concentration at 50% through the tube, there would be no red present. Is this possible? I am confused how to run that
If you look through my video list, you'll see I have one on 3d plotting. I believe that will answer some of this. You can also manually plot spheres(or other shapes) and color them if you need more flexibility than you get from the plot3d etc. functions.
I guess you mean the 5th (bottom middle) image? If so, have an equation to plot: sin( f.*x + w*t). X is a fixed vector, while t changes each frame. F and w are constant
Hi sir , I wanna you to explain in video , how to simplification video matrix (4d) and convert all video frames to binary, and then returns it to original shape, and play the video, please help me
I guess I'm not sure what you mean by that. The tricks I show in this video depend on you plotting the data. Once you have loaded it, and written a plotting routine, this should work for you.
@@CodingLikeMad close all v = VideoWriter('exp3Video.avi'); open(v); a = load('alpha=50xl=0.5wce=0_003ds1000final.out'); for k = 1:1000:64 X = a(:,1); Vy = a(:,4); plot(X,Vy); xlim([0,0.5]); ylim([-0.01,0.01]); frame = getframe(gcf); writeVideo(v,frame); end close(v) Its not working
I think this is not a good place for debugging code, I'd suggest the math works forums or the matlab subreddit. That said, I do notice your for loop line looks to have an error in it at leaat.