Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Iterating over the elements of a list' topicStudent Support Forum > General > "Iterating over the elements of a list"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
Bill Simpson
09/21/12 1:29pm

I don't know how your results are incorrect or what the correct results should be, but perhaps you can compare this with what you are getting and see if you can track down the discrepancy.

In[1]:= rhs={.0983367,.0929156,.0874946};
Table[FindRoot[.5*Log10[c]+.0983367*c==rhs[[i]],{c,1}],{i,1,3}]

Out[2]= {{c->1.},{c->0.982918},{c->0.96604}}

Plot lhs-rhs to see if the solutions above seem to match.

In[3]:= Plot[{.5*Log10[c]+.0983367*c-rhs[[1]],
.5*Log10[c]+.0983367*c-rhs[[2]],
.5*Log10[c]+.0983367*c-rhs[[3]]},{c,3/4,5/4}]

<graph snipped>

URL: ,

Subject (listing for 'Iterating over the elements of a list')
Author Date Posted
Iterating over the elements of a list Mac 09/19/12 4:51pm
Re: Iterating over the elements of a list Bill Simpson 09/21/12 1:29pm
Re: Iterating over the elements of a list yehuda 09/21/12 3:07pm
Re: Re: Iterating over the elements of a list mac 09/22/12 01:50am
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic