2) Review the MATLAB documentation for writing videos: https://www.mathworks.com/help/matlab/ref/videowriter.html. Then
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
2) Review the MATLAB documentation for writing videos: https://www.mathworks.com/help/matlab/ref/videowriter.html. Then
https://www.mathworks.com/help/matlab/r ... riter.html. Then write a MATLAB program to do the following: a. Create a VideoWriter object for an AVI video b. Set the frame rate to 30 Hz using the "set" command on the video object c. Use a for-loop to iteratively create 380 image frames i. For each frame, generate an image using the following code (where i is the loop index variable): [X,Y] = meshgrid(1:0.5:10,1:20); Z = sin(X+i/10) + cos(Y+i/10); surf(X,Y,Z); axis off; i. Add a colormap to the image (you can choose which type) ii. After each image is generated, write the frame to the video iii. After the loop finishes, close the VideoWriter object to finish writing the video Submit your MATLAB programs by attaching each .m file (make sure to list your names as a comment in each program)
2) Review the MATLAB documentation for writing videos: