quiz4 -...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Writeanduploadthescriptdescribedbelowtotheclasswebsite.Inorderto receivefullcredit,yourscriptmusthaveproperformatting,run,andgivethe correctoutput. Athermistor,orthermallysensitiveresistor,isasemiconductorcircuitelementthat isoftenusedinphysicsresearchlaboratoriestomeasuretemperatures.Probably themostimportantcharacteristicofathermistorisitsextremesensitivityto temperaturechanges.Theratioofitsresistanceat100oCtoitsresistanceat400oC maybeasmuchastenmilliontoone.Adisadvantageofthedeviceisthenonlinear relationshipbetweenitsresistanceRandtemperatureT.However,atheoretical equationthathasbeenverysuccessfulinfittingthedataforathermistorovera widerangeofvaluesistheSteinhartHartequation,namedafterthetwoscientists whofirstpublisheditin1968: 1 = a1 + a2 ln(R) + a3 [ln(R)]3 T Here,Tistheabsolutetemperature,ln(R)isthelogarithmofresistance,andthea's areconstantcoefficientsthatcanbedeterminedfromcalibrationdata. WriteaMATLABscriptthatwillreadinRTcalibrationdataforathermistorand determinethea'sbytheleastsquaresfitmethod.Inaddition,thescriptshouldplot theexperimentaldataandtheSteinhartHartequationfittothedataonthesame plot,withTinKelvinontheverticalaxisandRinkilohmonthehorizontalaxis.Be suretolabeltheaxesandprovideatitle.Plottheexperimentaldataasblack squaresandthebestfitSteinhartHartequationasaredline.Yourscriptshould outputyourvaluesforthea'stothecommandwindow. ImportantHints:IsentyoutheRTcalibrationdatatoyouviaemail.CopytheRT calibrationdataintoyourMATLABworkingdirectoryandbesuretonamethefile RTdata.dat.Thefilehas33linesandtwocolumns.Thefirstcolumncontains temperaturesinCelsiusandthesecondcolumncontainsthecorresponding resistancesinkilohms.UsetheMATLABcommandloadtoreadtheRTdata.dattext fileintoa33x2matrixinMATLAB.Next,createaTcolumnvectorofCelsius temperaturesinMATLABbyreadingintherowsandthefirstcolumnwiththe statementTC=RTdata(:,1),andthencreateanRcolumnvectorofresistancesin kilohmbyreadingintherowsandthesecondcolumnwiththestatementR= RTdata(:,2).BesuretoconvertthetemperaturesfromCelsiustoKelvin. IntroductiontoComputationalPhysics Phy265Quiz4(TakeHome) Due12:40p.m.February21,2011 TolinearizetheSteinhartHartequationset,y=1/Tandx=ln(R),andtheequation becomes y = a1 + a2 x + a3 x 3 Sincethispolynomialequationdoesnothaveasquaredterm,youcan'tusethe MATLABroutinepolyfittodotheleastsquaresfitting.Instead,youcandetermine theAmatrixbyusingtheleftdivideoperationwiththefollowingmatrixequation: HA = Y A = H \Y wheretheH,A,andYmatricesfortheNdatapointsaredefinedas ...
View Full Document

This note was uploaded on 02/23/2012 for the course PHYSICS 265 taught by Professor Tegler during the Spring '11 term at N. Arizona.

Ask a homework question - tutors are online