If a is an m by n rectangular matrix with m gt n and if c

Assignment Help Applications of MATLAB
Reference no: EM13347769

If A is an m by n rectangular matrix with m >= n and if c is a vector with n components then A c = y can not usually be solved exactly.  Matlab can solve these equations approximately with the command c = A \ y.   The solution c is called the "least squares" solution for reasons that we will describe later in the course.  To illustrate an application involving this use of a rectangular matrix suppose that we wish to fit the three points (0,3),  (2,5), and (4,6) with a straight line.  Then as we described earlier we can let the line be described by c1' + c2 x, let c = [ c1 ; c2] (using Matlab notation for vectors), let y = the vector of y values.and let A be a Vandermonde matrix with components aij= xIj-1 .  To fit the line to the data we need to try to solve the equation  A c = y..  In this example one can create A with the Matlab command A = [ 1 0;1 2;1 4] and y with y = [3 ; 5; 6].  Then c = A \ y gives c = [3.1667; .75].  The commands

 x=[0; 2; 4]                 % x isthe vector of x coordinates

 plot(x,y,'o',x,A*c)     % note that A*c generates points on the best fit line

 xlabel('x')

 ylabel('y')

 title('given points (o) and least squares fit (line)')

will plot the given points and the line 3.1667  + .75 x.  See the figure below.

For homework consider the points (0,0), (1,2), (2,3), (3,9), ( 4,17), (5,24), (6,37). (1) Use Matlab to find the least squares best fit with a line.  Turn in A, y and c and a plot like the one above.  Also (2) use Matlab to find the least square best fit with a quadratic.  Turn in the same information.

553_least_square.jpg

Reference no: EM13347769

Questions Cloud

Problem1 1 using if filter the data for these students : problem1 1. using if filter the data for these students into a column which contains the heights of only female
Global finance inc gfi is a financial company that manages : global finance inc. gfi is a financial company that manages thousands of accounts across canada the united states and
I health economic theory and practice- based on your work : i. health economic theory and practice- based on your work experience expertise or the field of interest select a
Problem 1a researcher is interested in evaluating whether : problem 1a researcher is interested in evaluating whether there is a relationship between number of packs of cigarettes
If a is an m by n rectangular matrix with m gt n and if c : if a is an m by n rectangular matrix with m gt n and if c is a vector with n components then a c y can not usually be
Problem1 the data below shows the number of absences x and : problem1 the data below shows the number of absences x and the final grade y of seven students in the statistics
Question 1consider the problem of operating a warehouse by : question 1consider the problem of operating a warehouse by buying and selling the stock of a certain commodity in order
Create a multi-threaded competition in which opposing robin : create a multi-threaded competition in which opposing robin hoods will attack one another and try to take each others
In gas-shy-solid fluidization it is frequently common to : in gas-shy-solid fluidization it is frequently common to have a wide size distribution of particles present in the

Reviews

Write a Review

Applications of MATLAB Questions & Answers

  P1 write the commands that will create the following matrix

p1 write the commands that will create the following matrix. you can use only special matrix commandsp2 two cars

  1 this problem is intended to demonstrate some problems

1. this problem is intended to demonstrate some problems that can arise from the finite precision of numerical

  Apply specific approach for pattern recognitionimplement

apply specific approach for pattern recognition.implement this approach in matlab.compare and discuss the results with

  In a shell-and-tube heat exchanger one fluid passes through

in a shell-and-tube heat exchanger one fluid passes through a central tube while another fluid flows through an outer

  Write a matlab function speed planetary n emesh first last

write a matlab function speed planetary n emesh first last arm that computes the speed of a given link in a

  1 let pnx be the lagrange interpolating polynomial of

1. let pnx be the lagrange interpolating polynomial of degree at most n that satis?es pnxi yi i 0 1 2 . . . n.write

  Problem consider a trapezoidal piece of polymer film as

problem consider a trapezoidal piece of polymer film as shown below. the parallel sides of the trapezoid are insulated

  Exercises1make a program that will graph the following

exercises1.make a program that will graph the following parabolas where x ranges from -10 to 10 in increments of 0.1.

  You will write functionsbull bnull basisatolbull brange

you will write functionsbull bnull basisatolbull brange basisatolthe function null basis takes a matrix a as input and

  Implementation in matlab under windows to open a named pipe

implementation in matlab under windows to open a named pipe and to read data from the pipe an other program writes into

  Plot way forms for the subsequent modulation schemes using

plot way forms for the subsequent modulation schemes using matlaba 2 asknbspnbspnbspnbspnbspnbspnbspnbspnbspnbspnbsp b

  Problem 1nbsp use matlab to answer the following system of

problem 1.nbsp use matlab to answer the following system of linear equations2x y 3z 1 2x 6y 8z 3 6x 8y 18z 5

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd