From: metin on
can u pls solve this? i tried all what i know.

the elationship between the resistance R of the thermistor and the temperature is given by
(1/T)-1.129241*10^(-3)=2.341077*10^(-4)*log(R)+8.775468*10^(-8)*(log(R))^(3)

where T is in Kelvin and R is in ohms.
A thermistor error of no more than 0.01C is acceptable. To find the range of the
resistance that is within this acceptable limit at 19C , we need to solve
1/19.01+ 273.15=1.129241×10^(-3) + 2.341077×10^(−4)*ln(R) + 8.775468 × 10^(−8)* {ln(R)}^(3)
and
1/18.99 + 273.15= 1.129241× 10^(−3) + 2.341077 × 10^(−4) ln(R) + 8.775468 × 10^(−8) {ln(R)}^3
Use Newton's method to find the resistance at 18.99C. Find the absolute relative
approximate error at the end of each iteration, and plot relative approximate error versus
iteration number.
From: dpb on
metin wrote:
> can u pls solve this? i tried all what i know.
>
> the elationship between the resistance R of the thermistor and
> the temperature is given by
> (1/T)-1.129241*10^(-3)=2.341077*10^(-4)*log(R)+8.775468*10^(-8)*(log(R))^(3)
>
> where T is in Kelvin and R is in ohms.
> A thermistor error of no more than 0.01C is acceptable. To find the range of the
> resistance that is within this acceptable limit at 19C , we need to solve
> 1/19.01+ 273.15=1.129241×10^(-3) + 2.341077×10^(−4)*ln(R) + 8.775468 × 10^(−8)* {ln(R)}^(3)
> and
> 1/18.99 + 273.15= 1.129241× 10^(−3) + 2.341077 × 10^(−4) ln(R) + 8.775468 × 10^(−8) {ln(R)}^3
> Use Newton's method to find the resistance at 18.99C. Find the absolute relative
> approximate error at the end of each iteration, and plot relative approximate error versus
> iteration number.

Well, as always w/ homework problems, "show your work"...

What did you try that was in your knowledge set and where, specifically,
did you have a Matlab problem?

--
From: metin on
truevalue=solve('(1/(18.99+273.15))-1.129241*10^(-3)=2.341077*10^(-4)*log(R)+8.775468*10^(-8)*(log(R))^(3)') %gercek R degeri
Ri=3; tol=273.15+0.01; error=273.15+10
k=1;
while error>=tol
f=1.129241*10^(-3)+2.341077*10^(-4)*log(Ri)+8.775468*10^(-8)*(log(Ri))^(3)-(1/(18.99+273.15));
df=((2.341077*10^(-4))/(Ri))+(8.775468*10^(-8)*3*(log(Ri))^2)/Ri;
Rnew=Ri-(f/df);
fnew=1.129241*10^(-3)+2.341077*10^(-4)*log(Rnew)+8.775468*10^(-8)*(log(Rnew))^(3)-(1/(18.99+273.15));
error=abs(fnew)
Ri=Rnew
k=k+1;
end
Rnew
relativeerror=[(error-truevalue)/truevalue]
plot(relativeerror,k)

i tried this and matlab shows
??? Error using ==> plot
Conversion to double from sym is not possible.

Error in ==> deneme4 at 15
plot(relativeerror,k)
From: Walter Roberson on
metin wrote:
> truevalue=solve('(1/(18.99+273.15))-1.129241*10^(-3)=2.341077*10^(-4)*log(R)+8.775468*10^(-8)*(log(R))^(3)') %gercek R degeri

Truevalue is going to be a symbolic number after that point, but from here on
you consistantly treat it as a floating point number; because it is symbolic,
the calculations involving it will take place symbolically, all the way to
relativeerror;

I suggest you add a double() call around the solve() call, which would
eliminate this issue.
From: metin on
i used this way now but there is still one point on graph.i have to show all relative errors versus k on the graph. what can u suggest for that?

R=solve('(1/(18.99+273.15))-1.129241*10^(-3)=2.341077*10^(-4)*log(R)+8.775468*10^(-8)*(log(R))^(3)') %gercek R degeri
Ri=3; tol=273.15+0.01; error=273.15+10
k=1;
while error>=tol
f=1.129241*10^(-3)+2.341077*10^(-4)*log(Ri)+8.775468*10^(-8)*(log(Ri))^(3)-(1/(18.99+273.15));
df=((2.341077*10^(-4))/(Ri))+(8.775468*10^(-8)*3*(log(Ri))^2)/Ri;
Rnew=Ri-(f/df);
fnew=1.129241*10^(-3)+2.341077*10^(-4)*log(Rnew)+8.775468*10^(-8)*(log(Rnew))^(3)-(1/(18.99+273.15));
error=abs(fnew)
relativeerror=(error/R)
Ri=Rnew
k=k+1;
end
ezplot(relativeerror,k)
 |  Next  |  Last
Pages: 1 2
Prev: problem
Next: Normal direction of faceNormals