0 penilaian0% menganggap dokumen ini bermanfaat (0 suara)
154 tayangan3 halaman
This experiment used MATLAB to generate and manipulate 2D and 3D analog signals and graphs. Various MATLAB functions were used to plot 2D signals by setting a sample frequency and to generate 3D meshes and contours. Operations like addition and multiplication of signals required the signals to be of equal length, which was achieved through zero padding. Combining different waveforms like sine and exponential, or fundamental and harmonics, produced damped or square/triangular waves respectively. MATLAB commands like plot, plot3, contour3, cplxgrid and cplxmap were used to visualize the 2D and 3D analog signals and complex functions.
This experiment used MATLAB to generate and manipulate 2D and 3D analog signals and graphs. Various MATLAB functions were used to plot 2D signals by setting a sample frequency and to generate 3D meshes and contours. Operations like addition and multiplication of signals required the signals to be of equal length, which was achieved through zero padding. Combining different waveforms like sine and exponential, or fundamental and harmonics, produced damped or square/triangular waves respectively. MATLAB commands like plot, plot3, contour3, cplxgrid and cplxmap were used to visualize the 2D and 3D analog signals and complex functions.
This experiment used MATLAB to generate and manipulate 2D and 3D analog signals and graphs. Various MATLAB functions were used to plot 2D signals by setting a sample frequency and to generate 3D meshes and contours. Operations like addition and multiplication of signals required the signals to be of equal length, which was achieved through zero padding. Combining different waveforms like sine and exponential, or fundamental and harmonics, produced damped or square/triangular waves respectively. MATLAB commands like plot, plot3, contour3, cplxgrid and cplxmap were used to visualize the 2D and 3D analog signals and complex functions.
In this experiment, we have used different methods in
generating and manipulating analog signals in MATLAB as well as showing its equivalent graphs. MATLAB has several functions that can be used in plotting both 2D and 3D graphs.
First, we have dealt with 2D analog signals. In generating 2D plots, we have used the plot(x,y) command wherein x is the independent variable and y is the dependent variable. However, sample points are needed in generating the curve and not directly the trigonometric functions. We have then generated the curve by setting a sample frequency that will be then used to obtain samples. We have observed that as we vary the sample frequency, the output waveform also changes. This is because the higher sample frequency, the closer are the samples from each other and thus provides a more accurate waveform. In addition, MATLAB is also capable of multiplying and adding up signals. However, the two signals must be of the same length in order to perform such operations. This is the reason why we have padded zeros to the signal of shorter length to make their lengths equal. We have seen that when we have combined a sine wave with an exponentially decaying signal, a damped sine wave is formed. In addition, when we have combined a fundamental sine wave with its several odd harmonics, either a square wave or a triangular wave is formed depending on the amplitude and frequency of the harmonics.
Next, we have used MATLAB to generate 3D graphs. We have first used the meshgrid command wherein in replicates the vectors -3 to 3 as a full grid. In generating the 3D plot, we have used the plot3 command wherein the 3 denotes that the graph is three-dimensional. We have then used the contour3 command to create a contour plot of 30 levels. Lastly, we have generated 3D graphs of complex functions. We have used the cplxgrid command to generate the polar coordinate complex grid of the two functions and the cplxmap command creates the plot for the function of a complex variable.
Conclusions
In MATLAB, the plot command is used to generate 2D plots while the plot3 command is used to generate 3D plots.
In generating analog signals, the higher the sample frequency is, the more accurate the output waveform would be.
In order to perform addition and multiplication of analog signals, they both must have the same length.
In order to make the lengths of the two analog signals to be equal, zero padding must be applied to the shorter signal.
The contour3 command is used to plot 3D graphs with a specified number of levels.
The cplxgrid command is used to generate the complex grid of an analog signal.
The cplxmap command is used to plot complex functions in 3D.