Message Boards Message Boards

0
|
3242 Views
|
4 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Help me! :( {calculating potential field}

Posted 10 years ago
Hi everybody
I want compute total potential field near some Nano Metal particles. I wrote Mathematica code for this purpose, but my results are not correct. What is wrong? emoticon



Download My code HERE
POSTED BY: maryam fathi.s
4 Replies
Posted 10 years ago
Thanks BillĀ 

In first my post I described that the equations how to construct (I showed them with a red rectangle). Maybe I need to more study emoticon
POSTED BY: maryam fathi.s
Posted 10 years ago
To try to evade the badly conditioned equations I appended thirty trailing zeros to each of the decimal values and I changed each //N to N[...,30].

When I then evaluated each cell one at a time and get down to your Solve it finds no solution and returns {}

I think all this strongly points towards there being a problem with the construction of EQS.

If you study that very carefully can you find any errors hiding in that?

I am very impressed with your use of Dropbox and how smoothly that works.
POSTED BY: Bill Simpson
Posted 10 years ago
Thanx Udo

I changed the functions and I used Block command but results are not changed emoticon

why mathematica show this error: "Result for RowReduce of badly conditioned matrix "

(Download Edited code HERE)
POSTED BY: maryam fathi.s
You should stick a bit with the syntax, in S2C[] and C2C[] the Return[] is syntactic sugar. I'm not sure whether the indexed Part[]-Operator [[]] like in



do really work as you intend it (Part[] normally goes unindexed) and last but not least, it's better for [\pi]tOut and [\phi]tIn to use a Block[] structure, i.e. instead of

fOut[...] := (a = 0; b = 0; <more expressions>)

please use

fOut[...]:= Block[{a=0, b=0}, <more expressions>]

Is there some test case you know the result for to check with?
POSTED BY: Udo Krause
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract