0
|
16639 Views
|
5 Replies
|
0 Total Likes
View groups...
Share
GROUPS:

# FindRoot::nlnum: The function value s not a list of numbers with dim...

Posted 9 years ago
 Hi, I'm Aerospace engineer. I try to compile this code but in the last part of it, appears that error. I dont understand where is the mistake. I have added such code in this message, and hope that someone give me an help. Thank you. Bye Attachments:
5 Replies
Sort By:
Posted 9 years ago
 Ok...I will do it. Thank you for suggestions.
Posted 9 years ago
 This is certainly possible in Mathematica but it would take a complete understanding of the subject rather than of Mathematica itself. Only you can solve this... Here are some suggestions after inspecting your code: 1. try to localise the variables within a Module or by using With or Block (look in the documentation) 2. use as much as possible Table, Map, etc.. to create loops rather than For-Next. escape the loops with Sow/reap or collect results with Throw/Catch. (again, see the docs)
Posted 9 years ago
 Sorry, but now I have another problem with the same code. I would like to do an external cycle on the r variable, so for each cycle in i variable I would like to change the value of r. I not be able to do it. I attached the code. Thank you Attachments:
Posted 9 years ago
 Grazie Mille!!!!
Posted 9 years ago
 In the equations you try to solve, the muF1 contains a function Re In:= \[Mu]F1 Out= 0.0119846 ((-3.03928 + 0. I) + (78.5811 + 0. I) d - 980.429 d^2 + 4199.85 d^3) Derivative[ Re][(-3.03928 + 0. I) d + (39.2905 + 0. I) d^2 - 326.81 d^3 + 1049.96 d^4] Where you define F1, eliminate the Re as follows (it is not needed) F1 = Integrate[ f, {x, 0, 2 \[Pi]/qbest}, {y, 0, 2 \[Pi] Sqrt/qbest}]/area; The muF1 will no longer contain Re' and will now be as follows: 0.0119846 ((-3.03928 + 0. I) + (78.5811 + 0. I) d - 980.429 d^2 + 4199.85 d^3) If you now solve your equation it works fine: In:= FindRoot[{\[Mu]F1 == \[Mu]fliq, PF1 == Pliq}, {{d, 0.167}, {n01, 0.001}}] Out= {d -> 0.183252 + 0. I, n01 -> 0.168551 + 0. I} I attached the corrected nb Attachments: