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
yehuda
09/21/12 3:07pm

Use FindRoot in place of NSolve
and modify a little bit you writing style
rhs = {.0983367, .0929156, .0874946};
sol = Table[FindRoot[.5*Log10[c] + .0983367*c == r, {c, 1}], {r, rhs}]

This return the results
{{c -> 1.}, {c -> 0.982918}, {c -> 0.96604}}

and check them with
Abs[(.5*Log10[c] + .0983367*c /. sol) - rhs]

to get
{0., 1.38778*10^-17, 4.02456*10^-16}

Which prove to be accurate enough

yehuda


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