Mathematica Asked on May 9, 2021
For example, say I have a function testfunc
already defined to take one argument $x$. This command would create a table of testfunc
for $x$ from $0.1$ to $0.9$ in steps of $0.1$:
ParallelTable[testfunc[x],{x,0.1,0.9,0.1}]
Suppose I know that testfunc
varies substantially more between $0.4 < x < 0.5$, so I want the ParallelTable to evaluate that region with more resolution. How can I run the command for $0.1 < x < 0.4, 0.5 < x < 0.9$ in steps of $0.1$, but the middle region in steps of $0.01$?
A first guess is to use something like ParallelTable[testfunc[x],{x,{Range[0.1,0.4,0.1],Range[0.41,0.49,0.01],Range[0.5,0.9,0.1]}}]
But it does not give the desired result.
In this case my desired result would be {0.1, 0.01},{0.2,0.04},{0.3,0.09},{0.4,0.16},{0.41,0.1681},{0.42,0.1764} ...
etc.
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP