# Data Entry And Plotting With Matlab

1821 Words8 Pages
Data Entry and Plotting with Matlab Effat Takaleh Abstract—regression analysis is a statistical process that is used to estimate the connections between the variables, relating the dependent and the independent variables. Many types of regression are used such as linear regression and quadratic regression. The goal of this lab is to become familiar with Matlab and M-files, and how to create plots along with how to enter and alter data. The regression analysis is sued to reflect the data behavior in a plot format to give visualization of it. The quadratic type of regression is used for better fitting. I. INTRODUCTION Curve fitting is a process where a curve is constructed with a mathematical function, which will have the best fit to a…show more content…
In the second part of the experiment an m-file was created from the xy-data imported from the bblearn site. The Matlab code is as follows: clear all close all load xydata1 figure(1) hold on axis([-.5 10.5 -.5 20]) grid on plot(x,y, 'bo ', 'Markersize ',6, 'Linewidth ',1) plot(x,y.*y/20, 'r+ ', 'Markersize ',6, 'Linewidth ',2) title( 'Calibration data for a Force Sensor ', 'Fontsize ',16) xlabel( 'Sensor Output (Volts) ', 'Fontsize ',12) ylabel( 'Force (Newtons) ', 'Fontsize ',12) legend( 'y ', 'y^2/20 ',2) In part 3 of the experiment, the plots of Matlab were exported, the size of the plots was chosen to be: 3in x 3in, and the font was chosen to be 10 points, Times new roman style. In part4 on the experiment the linear regression was performed using Matlab’s basic fitting tools. after modifying the code to create two plots that represent the two types of force of sensors, the code is shown below: clear all close all load xydata1 figure(1) hold on; grid on axis([-.5 10.5 -.5 20]) plot(x,y, 'bo ', 'Markersize ',6, 'Linewidth ',2) title( 'Calibration data for a Force Sensor ', 'Fontsize ',16) xlabel( 'Sensor Output (Volts) ', 'Fontsize ',12) ylabel( 'Force (Newtons) ', 'Fontsize ',12) legend( 'y ', 'y^2/20 ',2) figure(2) hold on; grid on axis([-.5