Experiment 1 - DELA CRUZ, Ashley ANNE C PDF

Title Experiment 1 - DELA CRUZ, Ashley ANNE C
Author Ashley Dela Cruz
Course Electronics and Communications Engineering
Institution Lyceum of the Philippines University
Pages 3
File Size 149.4 KB
File Type PDF
Total Downloads 95
Total Views 153

Summary

LAB REPORT...


Description

Basic Graphing (MATLAB) I.

Data and Results : 1. 1/X; Graph

2. exp(2t); Graph

3. 3*sin(2*pi); Graph

II.

OBSERVATION

Code

Code

Code

In this lab experiment, I perceived that if you typed a wrong code or If you forgot some punctuation marks in the command window, the results might be wrong or will not appear. Punctuation marks are really important because one missing punctuation mark can make your function not work and it is not just only in graphing but in others to. In matlab, you will know where did you got wrong in your inputs because it appears on the command window and it is only if you putted a wrong code. I also observed that the graph of the three functions that was given to us are different from each other and it is surely because they have different functions. We can also make a 3D or 2d graphs using matlab and we can also change the style of the graph depending on what do you like. The type of graph you choose to create depends on the nature of your data and what you want to reveal about the data. We can also use matlab in performing numerical linear algebra, numerical computation of matrices, data analysis and visualization, developing algorithms, creating interfaces for the user that is the GUI- Graphical User Interface and other applications that is the API. III.

CONCLUSION Through this experiment, I learned how to graph using matlab. To plot the graph of a given function, we must define first our x, by specifying the range of values for the variable x. We should also define the function, y = f (x) and then call the plot command as plot (x,y). I also learned that If X and Y are both vectors, then they must have equal length because graphing the function might lead to error if they are not have both an equal length. If X and Y are both matrices, then they must have equal size. The plot function plots columns of Y versus columns of X. If one of X or Y is a vector and the other is a matrix, then the matrix must have dimensions such that one of its dimensions equals the vector length. If the number of matrix rows equals the vector length, then the plot function plots each matrix column versus the vector. If the number of matrix columns equals the vector length, then the function plots each matrix row versus the vector. If the matrix is square, then the function plots each column versus the vector.

The purpose of the graph is to represent all our data given. Plot(X,Y) creates a 2-D line plot of the data in Y versus the corresponding values in X. The plot function in Matlab is used to create a graphical representation of some data. It is often very easy to "see" a trend in data when plotted, and very difficult when just looking at the raw numbers. To use the ‘plot’ function in Matlab, you should first make sure that the matrices/vectors you are trying to use are of equal dimensions. In Matlab if you do not know anything on what you are going to do, type ‘help (insert phrase)’ to get description of command functionality for example ; help plot  gives instructions for what arguments to pass the plot function, how to use it, what output to expect, etc. MATLAB allows you to add title, labels along the x-axis and y-axis, grid lines and also to adjust the axes to spruce up the graph. We can draw multiple graphs on the same plot. We can also do multiple plots and combine it together using matlab. We conclude that this lab experiment, helped ourselves become more familiarized in using matlab. Knowing the commands, symbols, operations in matlab lessen the time in doing this experiment also you must pay attention to all the codes, warnings, error messages, underlining and the tips that appears. We can say that MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages. There are also ways to plot in multiple dimensions in Matlab. One type of 3-D plot that may be useful is a surface plot, which requires you to generate some kind of x-y plane and then apply a 3rd function as the z dimension....


Similar Free PDFs