Question: How do I plot four second order curves in the same figure from data available in the form of list for all coordinates?

[[1000, 20], [2000, 25], [3000, 24], [4000, 23], [5000, 24]];
  [[1000, 20], [2000, 25], [3000, 24], [4000, 23], [5000, 24]]
data1 := [[1000, 20], [2000, 21], [3000, 32], [4000, 23], [5000, 23]]; 'data1';
                             data1
a*x^3+b*x^2+c*x+d;
                        3      2          
                     a x  + b x  + c x + d
x;
                               x
Equn1 := CurveFitting[LeastSquares]([[1000, 20], [2000, 25], [3000, 24], [4000, 23], [5000, 24]], x, curve = a*x^3+b*x^2+c*x+d);
plot(Equn1,x= 1000..5000)


 

Least Squares Approximation

 

 

Calculate a least squares approximation using specified data points.

 

 

Theoretical Curves for the Two-Stroke Engines and Four-Stroke Engines Brake Power Vs Brake Efficiency

List of Data Points:

[[1000, 20], [2000, 25], [3000, 24], [4000, 23], [5000, 24]]

[[1000, 20], [2000, 25], [3000, 24], [4000, 23], [5000, 24]]

(1)

data1 := [[1000, 20], [2000, 21], [3000, 32], [4000, 23], [5000, 23]]; 'data1'

data1

(2)

Fitting Curve:

a*x^3+b*x^2+c*x+d

a*x^3+b*x^2+c*x+d

(3)

Independent Variable:

x

x

(4)

Least Squares Curve:

Equn1 := CurveFitting[LeastSquares]([[1000, 20], [2000, 25], [3000, 24], [4000, 23], [5000, 24]], x, curve = a*x^3+b*x^2+c*x+d)

plot(Equn1,x= 1000..5000)

 

 

 

 

NULL

Equn1

31/5+(83/4200)*x-(23/3500000)*x^2+(1/1500000000)*x^3

(5)

 

 

Least Squares Fit of Data by a Specified Curve

List of Data Points:

[[3, -1], [5, 3], [6, -7], [7, 5], [9, -2]]

[[3, -1], [5, 3], [6, -7], [7, 5], [9, -2]]

(6)

Fitting Curve:

a*x^2+b*x+c

a*x^2+b*x+c

(7)

Independent Variable:

x

x

(8)

Least Squares Curve:

CurveFitting[LeastSquares]([[3, -1], [5, 3], [6, -7], [7, 5], [9, -2]], x, curve = a*x^2+b*x+c)

-901/210+(213/140)*x-(11/84)*x^2

(9)
 

 

a*x^2+b*x+c

a*x^2+b*x+c

(10)

plot(sin(x), x = 0 .. 4*Pi)

 

``


 

Download LeastSquareApproximation_2nd_and_3rd_Order.mw

The above command plots one curve alright. I want four such curves to go in the same figure using command like

plot(Equn1,Equn2,Equn3,Equn4,view(x=1000..5000)

I am not getting by the above command what I want. Can any one help. A shortcut method is required for me to repeat many times.

Thanks for help.

Ramakrishnav V
 

Please Wait...