4
$\begingroup$

In plotting a function with specific set of parameters using LogLinearPlot, Mathematica throws a SystemException[MemoryAllocationFailure] error. It works on occasion with other values of parameters, and always when simple Plot or LogPlot is used. Do you have any suggestions?

f[x_] = b + (a - b)/(1 + (x/c)^d);
setGood = {a->1417, b->52.2, c->9.68*10^16, d->0.68};
setErr = {a->1360, b->92, c->1.3*10^17, d->0.91};

LogLinearPlot[f[x]/.setGood, {x, 10^13, 10^20}](* works *)
LogLinearPlot[f[x]/.setErr, {x, 10^13, 10^20}](* throws error! *)

Plot[f[x]/.setErr, {x, 10^13, 10^20}](* works *)
LogPlot[f[x]/.setErr, {x, 10^13, 10^20}](* works *)
Plot[f[10^x]/.setErr, {x, 13, 20}](* works *)

PS: on Mathematica 11.1.1.0, using Windows 10 (64-bit)

$\endgroup$
  • $\begingroup$ For what it's worth, no error is thrown on 10.1 and LogLinearPlot plots fine. $\endgroup$ – eyorble Oct 27 '17 at 13:58
  • $\begingroup$ same for 11.0.1.0 OSX $\endgroup$ – Ruud3.1415 Oct 27 '17 at 14:05
  • $\begingroup$ On mac, I don't see the issue on 11.0.1, but I do see it on 11.1. I've reported it. $\endgroup$ – rcollyer Oct 27 '17 at 14:28
  • $\begingroup$ + no issue on v9.01 on Windows $\endgroup$ – Odysseus Oct 28 '17 at 15:10
4
$\begingroup$

With V11.1.1 running on OS X 10.10.2, I didn't get an error message, I got a kernel crash. A work-around is simply to change b from an exact number to a machine float.

Clear[a, b, c, d]
f[x_] := b + (a - b)/(1 + (x/c)^d)
setFix = {a -> 1360, b -> 92., c -> 1.3*10^17, d -> 0.91};
LogLinearPlot[f[x] /. setFix, {x, 10^13, 10^20}]

plot

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.