Tell me more ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

When I run the code:

q0 = FindRoot[findarea[ch, rh, ah, lineh, intersecth, q][[1 ;; 2]] == ah[[1 ;; 2]]*r3^2, 
   {q, q0}][[1, 2]];

FindRoot tries to run findarea[ch,rh]. Should I just modify findarea so that I can just pass it findarea[{ch, rh, ah, lineh, intersecth}, q] and only the first two arguments matter?

share|improve this question
1  
maybe. $\phantom{}$ – rm -rf Nov 15 '12 at 0:00
1  
Well, you could write something like, g[ch_?NumericQ, rh_?NumericQ, (* other args *)] := findarea[ch, (* other args *)][[{1, 2}]]... – 0x4A4D Nov 15 '12 at 0:01
It would help to have the full definitions of all variables used, otherwise, there's no way we can debug it. When in doubt, restart the kernel and try again. There could be an old definition hanging around. – tkott Nov 15 '12 at 14:53

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.