here is the code for the data set we have taken.
>> clear;
close all;
Tx = [80: -20: -340];
alphay=[6.47 6.36 6.24 6.12 6.00 5.86 5.72 5.58 5.43 5.28 5.09 4.91 4.72 4.52 4.30 4.08 3.83 3.58 3.33 3.07 2.76 2.45];
alphay=1.e-6*alphay;
plot(Tx,alphay,'bo');
title('Thermal expansion cofficient of steel');
ylabel('cofficient\alpha');
xlabel('temperature(in F)');
>> coef1=polyfit(Tx,alphay,1)
coef1 =
1.0e-05 *
0.0009 0.6025
>> coef1=polyfit(Tx,alphay,2)
coef1 =
1.0e-05 *
-0.0000 0.0006 0.6015
>> coef1=polyfit(Tx,alphay,3)
coef1 =
1.0e-05 *
0.0000 -0.0000 0.0006 0.5998
>> pred1=polyval(coef1,Tx);
>> pred2=polyval(coef2,Tx);
Undefined function or variable 'coef2'.
Did you mean:
>> coef1=polyfit(Tx,alphay,1)
coef1 =
1.0e-05 *
0.0009 0.6025
>> coef2=polyfit(Tx,alphay,2)
coef2 =
1.0e-05 *
-0.0000 0.0006 0.6015
>> coef3=polyfit(Tx,alphay,3)
coef3 =
1.0e-05 *
0.0000 -0.0000 0.0006 0.5998
>> pred1=polyval(coef1,Tx);
>> pred2=polyval(coef2,Tx);
>> pred3=polyval(coef3,Tx);
>> [pred1; pred2; pred3]
ans =
1.0e-05 *
Columns 1 through 7
0.6776 0.6588 0.6400 0.6213 0.6025 0.5837 0.5649
0.6432 0.6342 0.6243 0.6134 0.6015 0.5886 0.5748
0.6467 0.6357 0.6243 0.6123 0.5998 0.5866 0.5727
Columns 8 through 14
0.5462 0.5274 0.5086 0.4898 0.4711 0.4523 0.4335
0.5599 0.5441 0.5273 0.5095 0.4907 0.4710 0.4502
0.5581 0.5426 0.5264 0.5092 0.4910 0.4719 0.4517
Columns 15 through 21
0.4147 0.3960 0.3772 0.3584 0.3397 0.3209 0.3021
0.4285 0.4058 0.3821 0.3574 0.3318 0.3052 0.2776
0.4303 0.4078 0.3841 0.3592 0.3328 0.3052 0.2760
Column 22
0.2833
0.2490
0.2455
>> hold on
>> plot(tx,pred1)
Undefined function or variable 'tx'.
Did you mean:
>> plot(Tx,pred1)
>> plot(Tx,pred2,'r')
>> plot(Tx,pred3,'k--')
>> legend({'Data' 'Linear' 'Quadratic' 'Cubic'}, 'Location', 'Northwest')
>> hold off
>>
>> clear;
close all;
Tx = [80: -20: -340];
alphay=[6.47 6.36 6.24 6.12 6.00 5.86 5.72 5.58 5.43 5.28 5.09 4.91 4.72 4.52 4.30 4.08 3.83 3.58 3.33 3.07 2.76 2.45];
alphay=1.e-6*alphay;
plot(Tx,alphay,'bo');
title('Thermal expansion cofficient of steel');
ylabel('cofficient\alpha');
xlabel('temperature(in F)');
>> coef1=polyfit(Tx,alphay,1)
coef1 =
1.0e-05 *
0.0009 0.6025
>> coef1=polyfit(Tx,alphay,2)
coef1 =
1.0e-05 *
-0.0000 0.0006 0.6015
>> coef1=polyfit(Tx,alphay,3)
coef1 =
1.0e-05 *
0.0000 -0.0000 0.0006 0.5998
>> pred1=polyval(coef1,Tx);
>> pred2=polyval(coef2,Tx);
Undefined function or variable 'coef2'.
Did you mean:
>> coef1=polyfit(Tx,alphay,1)
coef1 =
1.0e-05 *
0.0009 0.6025
>> coef2=polyfit(Tx,alphay,2)
coef2 =
1.0e-05 *
-0.0000 0.0006 0.6015
>> coef3=polyfit(Tx,alphay,3)
coef3 =
1.0e-05 *
0.0000 -0.0000 0.0006 0.5998
>> pred1=polyval(coef1,Tx);
>> pred2=polyval(coef2,Tx);
>> pred3=polyval(coef3,Tx);
>> [pred1; pred2; pred3]
ans =
1.0e-05 *
Columns 1 through 7
0.6776 0.6588 0.6400 0.6213 0.6025 0.5837 0.5649
0.6432 0.6342 0.6243 0.6134 0.6015 0.5886 0.5748
0.6467 0.6357 0.6243 0.6123 0.5998 0.5866 0.5727
Columns 8 through 14
0.5462 0.5274 0.5086 0.4898 0.4711 0.4523 0.4335
0.5599 0.5441 0.5273 0.5095 0.4907 0.4710 0.4502
0.5581 0.5426 0.5264 0.5092 0.4910 0.4719 0.4517
Columns 15 through 21
0.4147 0.3960 0.3772 0.3584 0.3397 0.3209 0.3021
0.4285 0.4058 0.3821 0.3574 0.3318 0.3052 0.2776
0.4303 0.4078 0.3841 0.3592 0.3328 0.3052 0.2760
Column 22
0.2833
0.2490
0.2455
>> hold on
>> plot(tx,pred1)
Undefined function or variable 'tx'.
Did you mean:
>> plot(Tx,pred1)
>> plot(Tx,pred2,'r')
>> plot(Tx,pred3,'k--')
>> legend({'Data' 'Linear' 'Quadratic' 'Cubic'}, 'Location', 'Northwest')
>> hold off
>>
Very informative
ReplyDeleteAmazing post with lots of usefull information. Well done!. Keep Posting.
ReplyDeleteBest Car Interior Detailing Services in Bangalore
Car Interior Detailing Services in Bangalore
Best car wash in Bangalore
car wash in Bangalore
best car spa in Bangalore
car spa in Bangalore
car detailing in Bangalore
ceramic coating in Bangalore
paint protection film in Bangalore
Teflon coating in Bangalore
headlight restoration in Bangalore
interior cleaning in Bangalore
water wash in Bangalore
bike shine restoration in Bangalore
Best Solution of Roku activation
ReplyDeletevery helpful thank you
ReplyDeleteTechnology Write for Us
Thanks for sharing such an interesting article, your points were informative. This blog is always loaded with useful information that has helped me grow my blogs. Thanks for more.
ReplyDeleteTechnology Write for Us
Hii
ReplyDeletethis post gives me information about machine leaning curve fiting using MATLAB it is help to know technology exploration
thanks for this article
Technology Write for Us
u can also write in
heyy,
ReplyDeletevery informative post .
thanks for sharing it with us
you can also write for us https://technologymoon.com/write-for-us/
Since, there are alot of interpolating methods used for the curve fitting, namely Lagrange interpolation, Newton’s interpolation, Newton-Gregory forward interpolation, Spline interpolation and so on.
ReplyDeleteIt can also use in Microlearning where we can analyze learning.
Microlearning
Great article. Nice execution. I liked it. I want to visit your blog again.
ReplyDeleteHow To Make Email Id
If McAfee is not installing then it might be the issue with an internet connection. Check your internet connection and then make sure that your device doesn’t have third-party software. If available then get it removed. Also, free-up device space and check the system requirement for installing McAfee Antivirus.For more information visit the website.
ReplyDeletehttp://www.mcafeehelpnumber.co.uk/
You may find that the keys are too close together for comfort, or that the screen is not as big as you thought. If you're able to see a satta king physical model, play bazaar it will help make your decision easier.
ReplyDeleteDoing great job, just visit- Netgear Support UK to get in the touch with the expert.
ReplyDeleteNice post... It’s really awesome post. Thank you for sharing...If you are looking for Contact Wordpress or need Wordpress Help visit us.
ReplyDeleteLooking for Bike Rental in Goa, visit on: bike Rental in Goa
ReplyDeleteBike Rental in Goa
Thanks for sharing this post this is really helpful . Keep going .I am reading your allsite post.
ReplyDeleteThis is how my partner Wesley Virgin's biography begins with this SHOCKING AND CONTROVERSIAL VIDEO.
ReplyDeleteYou see, Wesley was in the military-and shortly after leaving-he found hidden, "SELF MIND CONTROL" secrets that the government and others used to get anything they want.
THESE are the exact same methods lots of famous people (especially those who "come out of nothing") and top business people used to become wealthy and famous.
You've heard that you utilize only 10% of your brain.
Mostly, that's because the majority of your BRAINPOWER is UNCONSCIOUS.
Perhaps this expression has even occurred IN YOUR own brain... as it did in my good friend Wesley Virgin's brain seven years ago, while riding an unlicensed, beat-up trash bucket of a car with a suspended driver's license and $3.20 on his bank card.
"I'm so frustrated with going through life paycheck to paycheck! When will I become successful?"
You took part in those questions, ain't it so?
Your success story is going to happen. You need to start believing in YOURSELF.
CLICK HERE TO LEARN WESLEY'S METHOD
I Read your blog about AI system. so thanks for share,
ReplyDeleteYou can get all technology informational blogs. So you can read and share with family and friends.
Provide good knowledge
ReplyDeleteGood ..
On the off chance that more data actually required or if there is some issue with the fix of the given Norton mistake then in such a case it is best that the client goes to the Norton Antivirus specialists for additional assistance and backing over the issues.
ReplyDeleteAll the nuances you need on the most ideal approach to manage regulate oversee regulate direct administer direct control direct control direct get your dream home is on this blog. If you have some problem with Hp Printer Offline click the link.
ReplyDeleteVery efficiently written information. It will be valuable to everyone who uses it, including myself. Thanks.
ReplyDeleteI can say this is the best way to know gain knowledge thank You!!
Regards
Web Designing Services in Lucknow
https://nsb.ac.in/
ReplyDeleteThis blog is written in simple language and one can understand the BullGuard features and nature simply by this post.Bullguard Customer Care Number in London
ReplyDeletegoruntulu show
ReplyDeleteücretli
İLD