# Tag Info

7

lst = {3, 7, 8, 10}; nl = NestList[MovingMap[Total, #, 1]&, lst, Length[lst] - 1] {{3,7,8,10},{10,15,18},{25,33},{58}} TeXForm @ MatrixForm @ PadLeft[nl, Automatic, ""] $\left( \begin{array}{cccc} 3 & 7 & 8 & 10 \\ \text{} & 10 & 15 & 18 \\ \text{} & \text{} & 25 & 33 \\ \text{} & \text{} & \text{} ... 3 One possible way f[x_,a_]=x*Log[x]+(1-x)*Log[1-x]-a*x^2; Plot[Evaluate@Table[f[x, a], {a, {0, 1, 2, 3, 4, 5, 6, 7}}], {x, 0.0001, 0.9999}] I would also consider changing your definition from f[x_,a_]=x*Log[x]+(1-x)*Log[1-x]-a*x^2; to f[x_,a_]:=x*Log[x]+(1-x)*Log[1-x]-a*x^2; 1 I think the error was the value for M. (Also cleaned up the code a bit.) ClearAll["Global*"] a0 = 5.29*10^(-11); wx = 2 Pi*45; wz = 2 Pi*133; h = 1.054*10^(-34); (* M=2.72*10^(-23); *) M = 163.9 1.66 10^-27; add = 130*a0; n = 15*10^3; az = Sqrt[h/(M*wz)]; l = wz/wx; f[X_] := (1 + 2 X^2)/(1 - X^2) - 3 X^2 ArcTanh[Sqrt[1 - X^2]]/(1 - X^2)^(3/2); yqf[as_]... 11 This is the actual problem, condensed in only a couple of lines: m1 = 10; m2 = 10; m3 = 10; m4 = 10; dims = {10, 10, 10, 10}; grids = { Subdivide[0., 1., m1 - 1], Subdivide[0., 1., m2 - 1], Subdivide[-6., 0., m3 - 1], Subdivide[0., 4., m4 - 1] }; origrid = Tuples[grids]; leng = Length[origrid]; pt = DeveloperToPackedArray[{0.45, 0.03, -4.089,... 2 Note, that every number in your Kerr list is bracketed with { }. ListPlot expects a list of the form: {{1,1},{2,4},{3,9}}. So you just have to remove that innermost brackets which, I think, comes from lists s &m. I am not sure how they are written in your data files. You can try to rewrite your function in the following way: Kerr = Table[{(s[[i]]/m[[... 2 The idea expressed in kglr's comment is a good one. I recommend you follow that advice and also make some changes to your plot generating code to Remove some unneeded options from DensityPlot. Add a label to each plot so it can be distinguished in the final array. Make changes to the code that will improve it robustness. My recommended revisions to your ... 2 The basic answer to your question is to use the option PlotPoints to increase the number of initial points to use: DensityPlot[ fR[Sqrt[x^2 + y^2]], {x,-5,5}, {y,-5,5}, PlotPoints->40, ColorFunction->GrayLevel ] That being said, I would do things differently. First, when solving the ODE I would use NDSolveValue, and I would use set, ... 1 Use FullSimplify rather than N xList = Range[8]; caNumbers = {2, 6, 12, 60, 120, 360, 2520, 5040}; epsilon = {Log[3/2]/Log[2], Log[4/3]/Log[3], Log[7/6]/Log[2], Log[6/5]/Log[5], Log[15/14]/Log[2], Log[13/12]/Log[3], Log[8/7]/Log[7], Log[31/30]/Log[2]}; colossalNumber = Table[Product[ p^(Floor[Log[(p^(1 + ϵ) - 1)/(p^ϵ - 1)]/Log[p]] - ... 5 Your problem is that Floor is unable to return an exact result for Log[8]/Log[2], which is why you needed to use Quiet: Floor[Log[8]/Log[2]] Floor::meprec: Internal precision limit$MaxExtraPrecision = 50.` reached while evaluating Floor[Log[8]/Log[2]]. Floor[Log[8]/Log[2]] Then, you used N which converts the argument to an approximate machine ...

1

You can write positions = data[[All, All, {2, 3}]], or by adjusting your code: positions = Table[{data[[j]][[i]][[2]], data[[j]][[i]][[3]]}, {j, 1, Length[data]}, {i, 1, Length[data[[j]]]}]

2

try Part: data[[All, All, {2, 3}]] {{{x1, y1}, {x1, y1}, {x1, y1}, {x1, y1}, {x1, y1}}, {{x2, y2}, {x2, y2}, {x2, y2}}, {{x3, y3}, {x3, y3}, {x3, y3}, {x3, y3}}}

2

Wrap Table in the first argument with Evaluate: ContourPlot[Evaluate @ Table[ x^2 + y^2 == k, {k, {.04, .09}}], {x, -.5, .5}, {y, -.5, .5}]

Top 50 recent answers are included