I am new to Matlab and I am trying to implement a section of a published paper, the basic idea of the part that i am implementing is to show the frequency spectrum of camera aperture. The shutter exposure is represented by images on the left side and their frequency spectrum on the right side as shown in the following image.
What the first image represents is that the camera shutter remains open for the entire duration of the exposure time (hence the continuous block). The next 3 images show flutter shutter where the shutter opens and closes according to a binary sequence (white means closed and non-white means open) during the exposure time.
I want to draw these blocks according to a coded sequence of length 52, as well as their frequency spectrum. The coded sequence for first block is all 1's, for second block its alternating 1's and 0's, for the third block its random binary sequence, and for the last block its 1010000111000001010000110011110111010111001001100111.
Can anyone guide me how to achieve this in Matlab? How do i draw these blocks according to the described binary sequence and plot their frequency spectrum? Any help would be highly appreciated.