Community RSS Feed
https://community.wolfram.com
RSS Feed for Wolfram Community showing any discussions in tag sorted by activeAnalysis and visualization of cholera case data from the 1854 outbreak
https://community.wolfram.com/groups/-/m/t/2284911
&[Wolfram Notebook][1]
[1]: https://www.wolframcloud.com/obj/a3f65006-edf5-410a-9d7b-91693ab115dc
[Original]:https://www.wolframcloud.com/obj/romanp/Published/CholeraEssayFinalCommunity1.nbRoman Parker2021-06-07T14:07:17Z[WSG21] Daily Study Groups featuring Notebooks: Intro and Going Further
https://community.wolfram.com/groups/-/m/t/2384890
On October 18th we will begin our next Daily Study Group series that will focus on "Notebooks". As a cohort of online learners we will work through the Wolfram U interactive course "[Introduction to Notebooks][1]" in short sessions hosted by Wolfram-certified instructors, that will feature live Q&A, review exercises, and additional examples on topics covered in the course. This study group will help you achieve the "Course Completion" certificate for the "Introduction to Notebooks" course after you complete the course quizzes.
We will follow up the two weeks of the "Introduction to Notebooks" study group with a week-long study group on "Going Further with Notebooks" which will feature additional material that builds on the introductory course. A certificate of program completion will be available for this series as well.
Please sign up here:
- Introduction to Notebooks: [Study group registration page][2]
- Going Further with Notebooks: [Study group registration page][3]
We will continue discussion on the topics covered in these study groups on this thread. Looking forward to the questions and shared ideas about using notebooks.
[1]: https://www.wolfram.com/wolfram-u/introduction-to-notebooks/
[2]: https://www.bigmarker.com/series/daily-study-group-intro-to-notebooks/series_details?utm_bmcr_source=community
[3]: https://www.bigmarker.com/series/daily-study-group-going-further-with-notebooks/series_details?utm_bmcr_source=communityAbrita Chakravarty2021-10-13T19:28:42ZWormhole time machines and multiple histories
https://community.wolfram.com/groups/-/m/t/2393402
*SUPPLEMENTARY WOLFRAM MATERIALS for the ARTICLE:*
> Barak Shoshany, Jared Wogan (2021).
> Wormhole Time Machines and Multiple Histories.
> arXiv:2110.02448
> [Full article PDF][1]
&[Wolfram Notebook][2]
[1]: https://arxiv.org/pdf/2110.02448v1
[2]: https://www.wolframcloud.com/obj/d66006f2-2b1e-4a38-8220-f9e5ae8a5045Barak Shoshany2021-10-26T16:37:53ZThe Penrose tiling: casting night and day
https://community.wolfram.com/groups/-/m/t/2386344
![Penrose Star][1]
![Penrose Sun][2]
In two previous posts on plane patterns, we discuss the relation between [substitution systems, cellular automata][3] and [template atlases][4]. Another plane pattern, the Penrose tiling, presents considerable difficulties in the form of non-crystallographic symmetry. Most people wouldn't bother to try and find a growth function, but we have two reasons to do just that. First, growth functions introduce a time variable, so provide a way from mathematical structure into physical process, thus toward the realm of quasicrystals. Second, perhaps more importantly, we would like to spend some of our limited time on this earth in the pursuit of pure beauty (even though pursuit of pure beauty might also be pursuit of total misery).
We need some functions to draw the actual tiles. To make the growth process easier, we put control points on every vertex, and allow for ten distinct orientations:
DepictThin[or_, v_, r_] := With[{verts = {{0, 0},
{Cos[2 r Pi/10], Sin[2 r Pi/10]},
{Cos[2 r Pi/10], Sin[2 r Pi/10]}
+ {Cos[2 (r - 1) Pi/10], Sin[2 (r - 1) Pi/10]},
{Cos[2 (r - 1) Pi/10], Sin[2 (r - 1) Pi/10]}}},
{White, Polygon[Expand@Plus[or, #, Part[-verts, v]] & /@ verts],
Lighter@Red,
Disk[or + Part[-verts, v] + verts[[2]],
1/4, {2 (r - 1) Pi/10, 2 (r - 5) Pi/10}],
Lighter@Purple,
Disk[or + Part[-verts, v] + verts[[4]],
1/4, {2 (r) Pi/10, 2 (r + 4) Pi/10}]}]
DepictFat[or_, v_, r_] := With[{verts = {{0, 0},
{Cos[2 r Pi/10], Sin[2 r Pi/10]},
{Cos[2 r Pi/10], Sin[2 r Pi/10]}
+ {Cos[2 (r - 2) Pi/10], Sin[2 (r - 2) Pi/10]},
{Cos[2 (r - 2) Pi/10], Sin[2 (r - 2) Pi/10]}}},
{White, Polygon[Expand@Plus[or, #, Part[-verts, v]] & /@ verts],
Lighter@Purple, Disk[or + Part[-verts, v] + verts[[1]],
1/4, {2 (r) Pi/10, 2 (r - 2) Pi/10}],
Lighter@Red, Disk[or + Part[-verts, v] + verts[[3]],
1, {2 (r + 5) Pi/10, 2 (r + 3) Pi/10}],
White, Disk[or + Part[-verts, v] + verts[[3]],
3/4, {2 (r + 5) Pi/10, 2 (r + 3) Pi/10}]}]
DepictRule = {TF -> DepictFat, TT -> DepictThin};
![Fat and Thin][5]
The one tile is usually called fat and the other thin. These tiles have matching rules, so they can only group around a vertex in one of eight legal vertex figures (in this case, vertex figures are essentially the same thing as what NKS calls templates). The atlas of all possible vertex figures is written out fully as:
Stars = Function[{off}, TF[{0, 0}, 1, 2 # - off] & /@ Range[5]] /@ {0,1};
Suns = Function[{off}, TF[{0, 0}, 3, 2 # - off] & /@ Range[5]] /@ {0, 1};
FHexes = Map[{TF[{0, 0}, 2, Mod[2 + #, 10]],
TF[{0, 0}, 4, Mod[4 + #, 10]],
TT[{0, 0}, 2, Mod[5 + #, 10]]} &, Range[10]];
Crowns = Map[{TF[{0, 0}, 4, Mod[2 + #, 10]],
TF[{0, 0}, 2, Mod[4 + #, 10]],
TT[{0, 0}, 3, Mod[4 + #, 10]], TF[{0, 0}, 3, Mod[3 + #, 10]],
TT[{0, 0}, 1, Mod[6 + #, 10]]} &, Range[10]];
Boats = Map[{TF[{0, 0}, 1, Mod[6 + #, 10]],
TF[{0, 0}, 1, Mod[4 + #, 10]],
TF[{0, 0}, 1, Mod[2 + #, 10]], TT[{0, 0}, 4, Mod[6 + #, 10]]} &,
Range[10]];
Splits = Map[{TF[{0, 0}, 3, Mod[#, 10]], TF[{0, 0}, 3, Mod[2 + #, 10]],
TF[{0, 0}, 3, Mod[4 + #, 10]], TF[{0, 0}, 3, Mod[6 + #, 10]],
TT[{0, 0}, 3, Mod[7 + #, 10]], TT[{0, 0}, 1, Mod[3 + #, 10]]} &,
Range[10]];
Wings = Map[{TT[{0, 0}, 1, Mod[7 + #, 10]],
TT[{0, 0}, 3, Mod[1 + #, 10]],
TF[{0, 0}, 3, Mod[#, 10]],
TT[{0, 0}, 1, Mod[3 + #, 10]], TT[{0, 0}, 3, Mod[7 + #, 10]],
TF[{0, 0}, 3, Mod[6 + #, 10]], TF[{0, 0}, 3, Mod[4 + #, 10]]
} &, Range[10]];
THexes = Map[{TT[{0, 0}, 4, Mod[#, 10]], TT[{0, 0}, 4, Mod[4 + #, 10]],
TF[{0, 0}, 1, Mod[#, 10]]} &, Range[10]];
AllFigures = List[Suns, Stars, FHexes, Crowns, Boats, Splits, Wings, THexes];
Partition[Map[Graphics[{EdgeForm[Black], # /. DepictRule},
PlotRange -> {{-2, 2}, {-2, 2}}, ImageSize -> 100] &,
AllFigures[[All, 1]], {1}], 4] // TableForm
![Penrose Vertices][6]
Assume that we have a partially complete tiling and would like to add more tiles along the boundary. To do so, we need to know: which partial configurations have a unique completion? To answer this question, we simply calculate all possible partial configurations and notice when some are unique, while others project down from multiple vertex figures. The combinatorics can be programmed, so it ultimately requires very little thought:
FatEdges[or_, v_, r_] := With[{verts = {{0, 0},
{Cos[2 r Pi/10], Sin[2 r Pi/10]},
{Cos[2 r Pi/10], Sin[2 r Pi/10]}
+ {Cos[2 (r - 2) Pi/10], Sin[2 (r - 2) Pi/10]},
{Cos[2 (r - 2) Pi/10], Sin[2 (r - 2) Pi/10]}}},
Function[{verts},
{FC[verts[[1]], Mod[r, 10]], TC[verts[[2]], Mod[r + 5, 10]],
FC[verts[[1]], Mod[r - 2, 10]], TC[verts[[4]], Mod[r + 3, 10]],
FR[verts[[4]], Mod[r, 10]], TR[verts[[3]], Mod[r + 5, 10]],
FR[verts[[2]], Mod[r - 2, 10]], TR[verts[[3]], Mod[r + 3, 10]]}
][Expand@Plus[or, #, Part[-verts, v]] & /@ verts]]
ThinEdges[or_, v_, r_] := With[{verts = {{0, 0},
{Cos[2 r Pi/10], Sin[2 r Pi/10]},
{Cos[2 r Pi/10], Sin[2 r Pi/10]}
+ {Cos[2 (r - 1) Pi/10], Sin[2 (r - 1) Pi/10]},
{Cos[2 (r - 1) Pi/10], Sin[2 (r - 1) Pi/10]}}},
Function[{verts},
{TR[verts[[1]], Mod[r, 10]], FR[verts[[2]], Mod[r + 5, 10]],
TC[verts[[1]], Mod[r - 1, 10]], FC[verts[[4]], Mod[r + 4, 10]],
FC[verts[[4]], Mod[r, 10]], TC[verts[[3]], Mod[r + 5, 10]],
FR[verts[[2]], Mod[r - 1, 10]], TR[verts[[3]], Mod[r + 4, 10]]}
][Expand@Plus[or, #, Part[-verts, v]] & /@ verts]]
EdgesRule = {TF -> FatEdges, TT -> ThinEdges};
ProjectRules[figure_] := Rule @@ # & /@ Map[List[ Sort[
Cases[figure[[1 ;; #]] /. EdgesRule, xF_[{0, 0}, yr_] :> xF[yr],
Infinity]],
figure[[#1 + 1 ;; -1]] ] &, Range[2, Length[figure] - 1]]
CompletionMap = Flatten[Map[Function[{rot}, ProjectRules[RotateRight[#, rot]]
] /@ Range[Length[#]] &, #] & /@ AllFigures];
UniqueCompletion = Cases[Tally[CompletionMap[[All, 1]]], {x_, 1} :> x];
UniqueMap = MapThread[ Rule, {UniqueCompletion, UniqueCompletion /. CompletionMap}];
AddRep[or_] := ReplaceAll[UniqueMap, {0, 0} -> or]
To see what we've done here (quite a lot by data structure and mapping), let's add another intermediary depiction function. There are $410$ total rules in **AddRep**, so we will only plot a random sample of 16:
DepictAddRule[rule_] := Show[Reverse[Map[Graphics[{EdgeForm[Thin],
Arrowheads[.1], Thick, # /. DepictRule},
ImageSize -> 150, PlotRange -> {{-2, 2}, {-2, 2}}] &, rule /.
Rule -> List /. {FR[r_] :> {Red,
Arrow[{{Cos[r Pi/5], Sin[r Pi/5]}, {0, 0}}]},
FC[r_] :> {Blue, Arrow[{{Cos[r Pi/5], Sin[r Pi/5]}, {0, 0}}]},
TR[r_] :> {Red,
Arrow[Reverse@{{Cos[r Pi/5], Sin[r Pi/5]}, {0, 0}}]},
TC[r_] :> {Blue,
Arrow[Reverse@{{Cos[r Pi/5], Sin[r Pi/5]}, {0, 0}}]}}, 1]]]
Partition[DepictAddRule /@ RandomSample[AddRep[{0, 0}], 16],
4] // TableForm
![update rules][7]
Basically, each image says that if we find this particular configuration of edge vectors in a partially complete tiling, then we should add one or more tiles, as depicted, to complete the figure. This is all good, but if we try to use only these $410$ rules, we quickly meet ambiguous conditions where we must choose one of two alternatives:
![alternatives][8]
In another beautiful apparition of parity symmetry, it turns out the first alternative is better for growing the Night configuration, while the second is better for Day. All that's left is to define iterators and axioms as follows:
StarFailSafe[or_] := Join[
Sort[{TC[Mod[2 + #, 10]], TC[Mod[6 + #, 10]], TR[Mod[3 + #, 10]],
TR[Mod[3 + #, 10]], TR[Mod[5 + #, 10]],
TR[Mod[5 + #, 10]]}] -> {TF[or, 2, # + 1],
TF[or, 4, # - 1]} & /@ Range[10]]
SunFailSafe[or_] := Join[Sort[
{TC[Mod[2 + #, 10]], TC[Mod[6 + #, 10]], TR[Mod[3 + #, 10]],
TR[Mod[3 + #, 10]], TR[Mod[5 + #, 10]],
TR[Mod[5 + #, 10]]}] -> {TF[or, 3, # + 6], TF[or, 3, # + 4],
TT[or, 1, # - 3], TT[or, 3, # + 7]} & /@ Range[10],
Sort[{TC[Mod[# + 1, 10]], TC[Mod[# + 1, 10]], TR[Mod[#, 10]],
TR[Mod[#, 10]],
TR[Mod[# + 2, 10]], TR[Mod[# + 2, 10]], TR[Mod[# + 4, 10]],
TR[Mod[# + 8, 10]]
}] -> {TF[or, 3, Mod[1 + #, 10]],
TF[or, 3, Mod[3 + #, 10]]} & /@ Range[10]]
CompleteFigures = Map[Sort[Cases[# /. EdgesRule, xF_[{0, 0}, yr_] :> xF[yr],
Infinity]] &, Flatten[AllFigures, 1]];
IterateSunFS[state_, comp_] := With[{VertexFigures = Function[{edges},
V[#, Sort[Cases[edges, x_[#, y_] :> x[y]]]] & /@ (
Complement[Union[edges[[All, 1]]], comp])][
Flatten[Union[state /. EdgesRule]]]},
{Join[state, If[Length[#] == 0, Print["^"];
With[{hits =
Cases[VertexFigures /.
V[or_, edges_] :> (edges /. SunFailSafe[or]),
TT[__] | TF[__], Infinity]},
Sow[hits]; hits], #] &@
Cases[VertexFigures /. V[or_, edges_] :> (edges /. AddRep[or]),
TT[__] | TF[__], Infinity]],
Join[comp,
Cases[VertexFigures,
V[x_, Alternatives @@ CompleteFigures] :> x]]}]
IterateStarFS[state_, comp_] := With[{VertexFigures = Function[{edges},
V[#, Sort[Cases[edges, x_[#, y_] :> x[y]]]] & /@ (
Complement[Union[edges[[All, 1]]], comp])][
Flatten[Union[state /. EdgesRule]]]},
{Join[state, If[Length[#] == 0, Print["^"];
With[{hits =
Cases[VertexFigures /.
V[or_, edges_] :> (edges /. StarFailSafe[or]),
TT[__] | TF[__], Infinity]},
Sow[hits]; hits], #] &@
Cases[VertexFigures /. V[or_, edges_] :> (edges /. AddRep[or]),
TT[__] | TF[__], Infinity]],
Join[comp,
Cases[VertexFigures,
V[x_, Alternatives @@ CompleteFigures] :> x]]}]
AxiomA = TF[{0, 0}, 1, 2 #] & /@ Range[5];
StateA1 = {AxiomA, {{0, 0}}};
AxiomB = TF[{0, 0}, 3, 2 #] & /@ Range[5];
StateB1 = {AxiomB, {{0, 0}}};
Now we can generate successive configurations and make a plot of where we were forced to make an arbitrary choice to continue growing the tiling. For the night configuration, we have, after about $35$ iterations:
AbsoluteTiming[ AData = Reap[NestList[IterateStarFS @@ # &, StateA1, 40]];]
Graphics[{EdgeForm[Black], AData[[1, -5, 1]] /. DepictRule,
Map[Disk[#, 1/3] &, Union[Flatten[AData[[2, 1, All, All, 1]], 1]]]}, ImageSize -> 800]
![ChoicesA][9]
And for the Day configuration, we have, after about $45$ iterations:
AbsoluteTiming[ data = Reap[NestList[IterateSunFS @@ # &, StateB1, 50]];]
Graphics[{EdgeForm[Black], data[[1, -5, 1]] /. DepictRule,
Map[Disk[#, 1/3] &,
Union[Flatten[data[[2, 1, All, All, 1]], 1]]]}, ImageSize -> 800]
![Choices B][10]
Using the same code, we can easily check both patterns up to $t\approx 150$, which gets us past the fourth or fifth wave / corona, in terms of light-red loops drawn around the pattern center. This very strongly suggests that the algorithm as presented here will grow patterns indefinitely. However, a little more work remains to be done to make the algorithm a proper Cellular Automaton algorithm. This can likely be accomplished by adding an extra binary variable at all binary-ambiguous vertices. This project we leave for another day...
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=PenroseStar.gif&userId=234448
[2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=PenroseSun.gif&userId=234448
[3]: https://community.wolfram.com/groups/-/m/t/2378397
[4]: https://community.wolfram.com/groups/-/m/t/2385117
[5]: https://community.wolfram.com//c/portal/getImageAttachment?filename=tiles.png&userId=234448
[6]: https://community.wolfram.com//c/portal/getImageAttachment?filename=PenroseVertexFigures.png&userId=234448
[7]: https://community.wolfram.com//c/portal/getImageAttachment?filename=UpdateRules.png&userId=234448
[8]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Alts.png&userId=234448
[9]: https://community.wolfram.com//c/portal/getImageAttachment?filename=ChoicesA.png&userId=234448
[10]: https://community.wolfram.com//c/portal/getImageAttachment?filename=ChoicesB.png&userId=234448Brad Klee2021-10-17T01:13:23Z2020 Brazilian Wild and Criminal Fires: Analysis and Visualization
https://community.wolfram.com/groups/-/m/t/2086531
**UPDATED:** Added the data from September ? 2020.
![brazilian wild and criminal fires][1]
&[Wolfram Notebook][2]
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=4089FireGIF2020.gif&userId=1682328
[2]: https://www.wolframcloud.com/obj/9ef2c0a5-d72f-4ea7-a8b1-070748b70efbPedro Cabral2020-10-01T00:07:33ZNetGANOperator seemingly converging to a fully biased generator
https://community.wolfram.com/groups/-/m/t/2393216
Hi,
I was experimenting with `NetGANOperator` and the training seemed to work fine as the loss function results were evolving more or less as I would have expected.
However, when training was done, I tried to generate images from a few latent vectors and I always got the same result (visually anyway). That seemed odd to me and I thought the only way the result could not depend on the input would be that all weights had converged towards zero, leaving only the biases.
Then I wondered : isn't that a trivial solution for a GAN? The generator would always produce the same output, and the discriminator only has to learn how to recognize that particular output.
I understand this is not a question specific to Mathematica but rather to machine learning in general but I thought I could get some explanations from this community.
Here is the notebook I was working on:
&[Wolfram Notebook][1]
[1]: https://www.wolframcloud.com/obj/8b110d73-7d3a-4307-9ec8-07392f75f8dcLucien Grondin2021-10-26T15:22:20ZHow can I uninstall a palette?
https://community.wolfram.com/groups/-/m/t/1973763
It is easy to install a palette. I can also overwrite an installed palette. How can I get rid of an installed palette?Ernst Huijer2020-05-14T08:57:40ZSet conda as the default python interpreter in Mathematica?
https://community.wolfram.com/groups/-/m/t/1948852
Hi,
I have several versions of python installed on my Mac and I want to set conda as the default Python interpreter in Mathematica when I press > to enter the Python environment. How can I do that?
The conda python is registered in Mathematica, with the help on https://support.wolfram.com/42342?src=mathematica . But currently the default interpreter is the python 2.7 in the mac system, not the python 3.7.6 in conda.
I tried manually run code with conda python by using StartExternalSession and the conda path, as shown in the image below. But this is of course not ideal....
Any idea to make conda default?
![enter image description here][1]
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=1991587447694_.pic_hd.jpg&userId=1935588HH C2020-04-21T05:44:01ZPlot functions and their guide function images into same coordinate system
https://community.wolfram.com/groups/-/m/t/2392665
In order to study characteristics such as the monotonic value range of a function, it is necessary to draw the function and its guide function into the same coordinate system.
for example:
use this code can plot the function
Plot[E^x (1 + x) + Cos[x], {x, -2, 2}]
![enter image description here][1]
use such code can solve its guide function
\!\(
\*SubscriptBox[\(\[PartialD]\), \(x\)]\((
\*SuperscriptBox[\(E\), \(x\)]\ \((1 + x)\) + Cos[x])\)\)
and plot it
![enter image description here][2]
but how to when i input a function then the mathematica can solve its guide function ,and last draw the two function's images into the same coordinate. thx
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=11.png&userId=1828799
[2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=12.png&userId=1828799lee tao2021-10-26T12:58:18ZHTMLSelect gives a wrong ouput?
https://community.wolfram.com/groups/-/m/t/2391344
I am using the bellow code. With opA or opD works but not with opB or opD. Perhaps because in the output B and C is used 10^-6! But why?. Also, in OpB and optC the menu reset to OptA .
![enter image description here][1]
![enter image description here][2]
<%@ page language="java" %>
<%@ taglib uri="/webMathematica-taglib" prefix="msp" %>
<html>
<head>
<title>TITULO</title>
<link rel=stylesheet type='text/css' href='css/estilo1.css'>
</head>
<body bgcolor="#ffffff" >
<form name="formulario" action="biokmodfit2.jsp" method="post">
Choose one option:
<msp:evaluate>
HTMLSelect[{"OpA","OpB","OpC","OpD"}, {2.4*10^-5, 0.32*10^(-5), 2.1*10^-6, 4.2*10^-5}, "dcf", SelectedValues -> {$$dcf}]
</msp:evaluate>
Or
<INPUT TYPE="TEXT" NAME="dcfOptional" ALIGN="LEFT" SIZE="35"
VALUE="<msp:evaluate> MSPValue[$$dcfOptional,"0.0"]
</msp:evaluate>"
/>
<INPUT TYPE="checkbox" NAME="dcfOptionalChbx" >
</td></tr>
<br>
<p class='azulpeque' align='center'>Push EVALUATE <br><img src="images/help.gif" width="1%" heigth="1%" border="0"></a></p>
<center><input type="submit" name="btnSubmit" value="Evaluate" > </center>
<img name="results" src="images/results.gif" class="icon" align="absmiddle" border="0" width="100%">
<font class='rojo'><b> Input data </b></font>
<msp:evaluate>
If[$$dcfOptionalChbx==="on",$$dcf=$$dcfOptional];
HTMLTableForm[MSPBlock[{$$dcf}, {$$dcf}]]
</msp:evaluate>
</form>
</body>
</html>
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Captura2.JPG&userId=430661
[2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Captura1.JPG&userId=430661Guillermo Sanchez2021-10-23T17:25:12ZInitial guess and no. of iterations in NonlinearModelFit[ ]?
https://community.wolfram.com/groups/-/m/t/2392651
In "Non Linear Model Fit",
1) how we can check what initial guess it is taking?
2) how we can define our own initial guess to get better regression coefficient?
3) can we increase number of iterations?
data={{0.133315, 0.0999874, 0.000146902}, {0.166645, 0.0999874,
0.000214002}, {0.179184, 0.0999874, 0.0000934653}, {0.190344,
0.0999874, 0.000078778}, {0.199975, 0.0999874,
0.0000733382}, {0.211777, 0.0999874, 0.0000694502}, {0.222074,
0.0999874, 0.000121813}, {0.233305, 0.0999874,
0.000151461}, {0.266636, 0.0999874, 0.00015451}, {0.299968,
0.0999874, 0.000152593}, {0.199975, 0.0333287,
0.000025114}, {0.199975, 0.0666579, 0.0000846425}, {0.199975,
0.0752138, 0.0000452293}, {0.199975, 0.0876898,
0.0000409033}, {0.199975, 0.0999874, 0.0000733382}, {0.199975,
0.111659, 0.000106408}, {0.199975, 0.123177,
0.000128768}, {0.199975, 0.133317, 0.00019747}, {0.199975, 0.166648,
0.000230625}, {0.199975, 0.0752138, 0.0000452293}, {0.199975,
0.199978, 0.000278124}};
Subscript[r, PL] = k Pch4^a Po2^b;
NLM5 = NonlinearModelFit[data, Subscript[r,
PL], {k, a, b}, {Pch4, Po2}]
NLM5["AdjustedRSquared"]
NLM5["BestFitParameters"]Mohammad Ahmad Shoeb2021-10-26T08:21:54ZHow to crop non-rectangular images in the map?
https://community.wolfram.com/groups/-/m/t/2393002
There is an image classification problem about land cover/land use~~
How to get only the image in the sampling area (inside the circle)?
&[Wolfram Notebook][1]
[1]: https://www.wolframcloud.com/obj/c0a2d97f-2235-46b1-be87-7550257c8316Tsai Ming-Chou2021-10-26T02:29:14ZThe sound of minute repeater: computational analysis & synthesis
https://community.wolfram.com/groups/-/m/t/2386951
&[Wolfram Notebook][1]
[1]: https://www.wolframcloud.com/obj/a5b26a59-e94c-4335-a06d-be68868e3a88
[Original NB]: https://www.wolframcloud.com/obj/169c961e-e735-4ced-bafe-8b2f7440e60aJames Lu2021-10-18T02:02:33ZExplore S. Rabinowitz's golden result with ComplexPlot
https://community.wolfram.com/groups/-/m/t/2268974
![gold][1]
&[Wolfram Notebook][2]
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=gold.gif&userId=23928
[2]: https://www.wolframcloud.com/obj/b4a2a378-fc03-463f-9db7-48024cc14d12Shenghui Yang2021-05-15T19:03:30ZSaving list of controls values in Manipulate[ ]?
https://community.wolfram.com/groups/-/m/t/2383059
How can I save a certain configuration in a manipulate script (with some slider values and some checkboxes and tabs f.i.), so i can later reload these settings again into the Manipulate (script or object)?
If that is not possible, which would surprise me, how can I save the values of the Sliders etc. into a List?
I know of Snapshot : but I do not need the complete Manipulate script every time, I need just the values of the controls.
Thanks.B. Cornas2021-10-10T18:45:57ZNotebook behaves differently in Mathematica and Wolfram Player?
https://community.wolfram.com/groups/-/m/t/2391187
I have a Prueba.nb file that works fine within Mathematica 12.3.1.
I convert it to a Prueba.CFD file and the test that numbers are entered in the InputField box when running in Wolfram Player 12.3.1 stops working.
Within the project that I develop, in other circumstances, Wolfram Player does not behave in the same way as in Mathematica.
Any ideas?
GraciasErnesto Espinosa2021-10-23T16:21:08ZPoncelet triangles and the amazing loci of the isogonal conjugates
https://community.wolfram.com/groups/-/m/t/2392125
![enter image description here][1]
&[Wolfram Notebook][2]
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=wc-1.png&userId=1715757
[2]: https://www.wolframcloud.com/obj/3e549c6e-7e59-48e9-861c-3affabec5696Dan Reznik2021-10-24T21:33:24ZDefine a boundary for heat equation for a 2D surface?
https://community.wolfram.com/groups/-/m/t/2392436
Working with NDSolve trying to define a boundary condition that is a function of time.
I did this using a piecewise definition in a DirichletCondition statement. But when I run NDSolve it says the statement can not be parsed and is ignored.
Is it possible to define a boundary as a function of time using the DirechletCondition statement?
I attached a short notebook that provides some code.
&[Wolfram Notebook][2]
[2]: https://www.wolframcloud.com/obj/14cd0e73-d41c-4589-954d-9e769624f513Edward Davis2021-10-25T15:39:28ZFindroot error: not a list of numbers?
https://community.wolfram.com/groups/-/m/t/2392504
Hi,
Thank you in advance for taking the time to look at my problem. I would be grateful if you could help me with the code.
I'm trying to simulate the transitional values for my model after obtaining steady-state values (k = 871.829). However, this is the error msg I have been receiving all the time no matter what I try (within my limited knowledge):
FindRoot[capeq[1] == 0, {k[2], 871.8287954437363}]
FindRoot::nlnum: The function value {-1.013 d[2.]+<<9>>+<<1>>-(1.05 (<<15>>+ <<2>>))/(<<19>>+<<18>>)} is not a list of numbers with dimensions {1} at {k[2]} = {871.829}.
The capeq[1] equation as follows, since t = 1 to 30:
capeq[t_] =
a[1, t] + a[2, t - 1]/(1 + n) + a[3, t - 2]/(1 + n)^2 +
a[4, t - 3]/(1 + n)^3 + a[5, t - 4]/(1 + n)^4 +
a[6, t - 5]/(1 + n)^5 -
d[t + 1]*(1 + n) - (1 + n)*
k[t + 1]*(l[1, t] + l[2, t - 1]/(1 + n) + l[3, t - 2]/(1 + n)^2 +
l[4, t - 3]/(1 + n)^3 + l[5, t - 4]/(1 + n)^4 +
l[6, t - 5]/(1 + n)^5)
I hope the above information is adequate for you to help me.
Much appreciation for your time.
Most humbly,
Pemapemma dorji2021-10-25T10:25:28ZHow to draw this region plot in log scale
https://community.wolfram.com/groups/-/m/t/2391948
I have two equations from which I have to draw a region plot in Log scale,
1/y<3*10^-19*x^1/2*HeavisideTheta[x-(6*10^36/y)]
y<10^55*x^-3/2*HeavisideTheta[-x+(6*10^36/y)]John Wick2021-10-24T13:36:45ZSame output always from different cells?
https://community.wolfram.com/groups/-/m/t/2390484
Evaluate the upper cell and BOTH cells show output with 60deg triangles.
Evaluate the lower cell and BOTH cells show output like a patchwork quilt.
The upper cell should show 60deg triangles;
The lower cell should show a patchwork quilt.
How do I correct this intolerable situation?
I get this type of instability often when using Manipulate and Dynamic Updating. It often occurs across
different open Notebooks, ie evaluating a cell destabilizes the output of another cell in a different Notebook. Yet I have not seen any reference to this problem in Mma textbooks or online.
I hope someone can help me avoid this crippling problem.Cormac Burke2021-10-22T18:52:43ZContour plot for disersion curve not working
https://community.wolfram.com/groups/-/m/t/2391482
Hello,
I am trying to display a contour plot and vary some values to see how the Fermi surface would chance but for some reason the plot wont show up, any ideas of what I am missing?
ax = 2 ay;
ty = 2 tx;
co = 20;
Manipulate[
ContourPlot[
co - 2 tx Cos[kx ax] - 2 ty Cos[ky ay], {kx, 0, 2 Pi}, {ky, 0,
2 Pi}], {ay, 0, 10}, {tx, 0, 10}]Macarena likethesong2021-10-24T06:42:23ZWhy does FourierSeries[] return the input?
https://community.wolfram.com/groups/-/m/t/2391805
Why doesn't this work?
freq = 10.0*^6
FourierSeries[SquareWave[freq*t], t, 5]
All Mathematica does is throw my expression back at me.
Thanks.Roger Backhus2021-10-24T18:08:26ZUsing Piecewise inside RevolutionPlot3D gives empty areas?
https://community.wolfram.com/groups/-/m/t/2391722
Why when you use a function defined by Piecewise in an interval [a,b] and you use this function in RevolutionPlot3D this show us a broken surface?
peon[x_] :=
Piecewise[{{1 - x/2, 0 < x <= 1}, {1/2,
1 <= x <= 3}, {3/4 - (x - 7/2)^2, 3 <= x < 4}}]
Plot[peon[x], {x, 0, 4}, AspectRatio -> Automatic,
AxesOrigin -> {0, 0}, PlotRange -> All]
ParametricPlot[{peon[y], y}, {y, 0, 4}, PlotRange -> Full]
RevolutionPlot3D[{peon[y], y}, {y, 0, 4}, PlotRange -> All,
AspectRatio -> Automatic]
And I want to know if this discontinuity affects when you send the file to 3D printing.Ramiro Saldaña2021-10-24T04:51:18ZHow to define a function with multiple expressions
https://community.wolfram.com/groups/-/m/t/2391567
I apologize for the simplicity of this question. The following statement works fine
For [ i = 1, i < 4 , i++, ( Print ["Fred"]; Print [ "harry"] ) ]
Fred
harry
Fred
harry
Fred
harry
So Mathematica easily evaluates compound statements. I would like to create a function called PrintFredAndHarry which takes no parameters and just evaluates the compound statement, so that whenever Mathematica sees PrintFredAndHarry it evaluates the compound statement ( Print ["Fred"]; Print [ "harry"] )
I have in mind a much more complex compound statement containing at least 40 or 50 expressions which I use to evaluate a list of strings which basically contains the data and metadata for a card from a HyperCard stack. Right now it is a sequence of isolated expressions in a Mathematica Notebook, and as I step through the expressions one by one it works fine.
This is an incredibly simple question, but I can't seem to be able to make the compound statement a function.Lewis Robinson2021-10-23T22:27:58ZIssue activating Wolfram Engine on Windows
https://community.wolfram.com/groups/-/m/t/1803365
Was excited to learn of the free Developer's access to Wolfram Engine, then disappointed when I couldn't activate the product from Windows (by providing the username and password in the wolframscript terminal). I kept getting a complaint that the username/password was incorrect. I know this is usually user error, but I tried enough times and ways of entering to dismiss that. Then it occurred to me that maybe Wolfram were scrubbing the input in the password field, removing what are in some contexts dangerous characters. I changed my pw to a long alphanumeric instance and the activation worked first time.William Isaacs2019-10-07T19:59:22ZIssue with WorkingPrecision in FindRoot?
https://community.wolfram.com/groups/-/m/t/2391287
Hello,
I would like to ask about how WorkingPrecision option works in FindRoot. Basically, I have two functions \theta and \phi on a lattice N1xN1. On each site I have two equations like below with some boundary conditions, so I use FindRoot to solve all of them. I've got warning message like on second picture and result was not quite physical so I decided to increase WorkingPrecision, but when I change it to whatever except MachinePrecision calculation freezes(I checked 3,6,16,50). As I understood by changing WorkingPrecision I simply change number up to which Mathematica holds the order during computation(maybe there are some nuances like this is order in hexadecimal system but nevertheless), but it looks like there is something else. I would be very grateful if someone can help me. Notebook is attached, I highlighted Findroot with red. ![Equations][1]![Warning about precision][2] ![FindRoot itself][3]
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=1.jpg&userId=2391255
[2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=2.jpg&userId=2391255
[3]: https://community.wolfram.com//c/portal/getImageAttachment?filename=3.jpg&userId=2391255Dmitry Kiselov2021-10-23T14:02:56ZHow to find the inverse CDF of a bivariate triangular distribution?
https://community.wolfram.com/groups/-/m/t/2391061
Hi,
I would like to find the inverse CDF of a correlated bivariate triangular distribution (D), but cannot seem to work out how to do this with Mathematica. Here is the distribution D:
![enter image description here][1]
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2021-10-22at11.03.29PM.png&userId=2391047Nikolas W2021-10-23T06:06:14ZProblem with Plot?
https://community.wolfram.com/groups/-/m/t/2390798
I did it as the book says, but it doesn't work. Can someone help me?? ![enter image description here][1]
![enter image description here][2]
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=23.png&userId=2390784
[2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=12.png&userId=2390784Aki ZERO2021-10-23T02:02:37ZPlacing images on polyhedra
https://community.wolfram.com/groups/-/m/t/2391302
![enter image description here][1]
&[Wolfram Notebook][2]
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Dia3.JPG&userId=20103
[2]: https://www.wolframcloud.com/obj/4149267b-88aa-42cc-9cf8-4e4a6d9279dfSandor Kabai2021-10-23T09:12:29ZLike cells with different output. Why the difference?
https://community.wolfram.com/groups/-/m/t/2384169
Unless it's a careless mistake, these two cells appear to me to be equivalent. The only difference is, in the first cell, an argument is explicit as opposed to a previously defined name in the second cell. Using Evaluate[] and/or ReleaseHold[] on every possible argument in the explicit example doesn't change the cell's output. I think the second result is the correct one. Using the default lexicographic monomial order, I think the remainder of f divided by the Groebner basis is 2z. As of 18 Oct. 2021, 119 people had viewed this with no reply, which is unusual in my limited experience.
&[Wolfram Notebook][1]
[1]: https://www.wolframcloud.com/obj/f2c17ea8-dcc3-40d4-b5e5-7030c62a034eJay Gourley2021-10-11T22:11:16ZProblem with dynamic content and unnecessary double quotes?
https://community.wolfram.com/groups/-/m/t/2390762
I am trying to create dynamic content. I have this problem where I display output and when I try to copy and paste the output to another notebook file, I get unnecessary double quotes around words and an equal sign. Is there any way I can get rid of these double quotes in my input? Please find attached the file to my notebook.Teni Ogunsan2021-10-22T17:54:38ZInterpolating functions as output for NDSolve[ ]
https://community.wolfram.com/groups/-/m/t/2390685
Working with the pde numeric solvers.
If I use a statement like:
sol = NDSolveValue[{op == 0, pbc, Subscript[\[CapitalGamma], Dc]},
u, {x, y} \[Element] \[CapitalOmega]]
I will get back an interpolating function and I can do things like sol[3,4] to pull values from the function.
If I use the form
sol = NDSolveValue[{op == 0, pbc, Subscript[\[CapitalGamma], Dc]},
u[x, y], {x, y} \[Element] \[CapitalOmega]]
I get back an interpolating function with [x,y] appended at the end. If I try sol[3,3] the output just appends [3,3] to the end.
How ever statements like:
ContourPlot[sol, {x,-1,4},{y,0,4}] still work.
Can someone point me in the right place to understand why the two outputs are different?
ThanksEdward Davis2021-10-22T18:19:14ZUsing NBodySimulation with a custom pairwise function?
https://community.wolfram.com/groups/-/m/t/2387798
**Background:**
Popular solid-state Nuclear Magnetic Resonance (NMR) techniques measure inter-atomic distances by observing the rate of transfer of magnetization between two spins by a spin diffusion mechanism. Plots of normalized magnetization vs spin diffusion mixing time are matched with simulated spin diffusion buildup curves for various inter-atomic distances (*r*) to find the best fit.
For some interesting biomolecular problems, such as the distance from membrane lipids chains to a site on a protein, the following 1D lattice simulation procedure is implemented:
1. Arrange (*r*+1) points *i* along a 1D grid with width equal to your "guess" distance *r*.
2. Set initial magnetization: M<sub>1,t=0</sub> = 1 and M<sub>i=/=1, t=0</sub> = 0
3. Evolve magnetization for all points by ∆M<sub>i</sub>/∆t = D/a<sup>2</sup>[(M<sub>i+1</sub> - M<sub>i</sub>) - (M<sub>i</sub> - M<sub>i-1</sub>)] (where D and a<sup>2</sup> are constants) for some # of steps.
4. Repeat for different simulation times and make a buildup curve; determine fit with data.
**Question** How do I implement Step 3 above in the *law* argument of the NBodySimulation function?
**Follow-up question if this is impossible**: Should I be going a SystemModelParametricSimulate direction instead?
Note: this Mathematica Stack Exchange thread ends with a similar unanswered query: https://mathematica.stackexchange.com/questions/105342/how-best-to-simulate-n-body-systems-in-a-functional-wayMadeleine Sutherland2021-10-18T20:57:56ZBasic user interface application
https://community.wolfram.com/groups/-/m/t/2390337
Nowadays I am working on Mathematica software. I would like to make a user interfaced application by using GUIKit library. In my application there is two fields , one is input argument field the other one is output field. There is also one button to text input value to the output field. Unfortunetaly I couldn't get the input field value. I am attaching my script codes to here. What should I write to "?????" field ?
Needs["GUIKit`"]
ref = GUIRun[
Widget["Panel",
{Widget["Label", {"text" -> "Enter the Inputs"},
WidgetLayout -> {"Alignment" -> Center},
Name -> "mainLabel"],
{Widget["Label", {"text" -> "Temperature:"}],
WidgetAlign[],
Widget["TextField", {"columns" -> 20 },Name->"temparg"],
WidgetAlign[],
Widget["Label", {"text" -> "K"}]},
{Widget["Label", {"text" -> "Value:"},
WidgetLayout-> {"Alignment" -> Left}],
WidgetAlign[],
Widget["TextField",{"preferredSize"->Widget["Dimension",{"width"->150,"height"->20}],"editable"->False},
WidgetLayout->{"Alignment"->Right},
Name -> "get"]},
{WidgetAlign[],
Widget["Button", {
"text" -> "Get Results",
BindEvent["Action",Script[SetPropertyValue[{"get","text"},??????]
]]
},
WidgetLayout-> {"Alignment" -> Right}]
}
}
]]Aytug PARLAKTAS2021-10-21T20:54:33ZAn in silico investigation of menthol metabolism
https://community.wolfram.com/groups/-/m/t/2390643
*SUPPLEMENTARY WOLFRAM MATERIALS for the ARTICLE:*
> Taweetham Limpanuparb, Wanutcha Lorpaiboon, Kridtin Chinsukserm (2019).
> An in silico investigation of menthol metabolism. PLOS ONE 14(9): e0216577.
> https://doi.org/10.1371/journal.pone.0216577
> [Full article PDF][1]
&[Wolfram Notebook][2]
[1]: https://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0216577&type=printable
[2]: https://www.wolframcloud.com/obj/3be2a0f5-d9ee-4459-b117-bad23bf71468
[Original NB]: https://www.wolframcloud.com/obj/817e1556-99e2-4774-92a6-208094c045b6Piyathida Tawornparcha2021-10-22T14:17:39ZDRAKE: dark matter relic abundance beyond kinetic equilibrium
https://community.wolfram.com/groups/-/m/t/2390834
*SUPPLEMENTARY WOLFRAM MATERIALS for the ARTICLE:*
> Binder, T., Bringmann, T., Gustafsson, M., Hryczuk, A. (2021).
> DRAKE: Dark matter Relic Abundance beyond Kinetic Equilibrium.
> The European Physical Journal C 81 (2021), 577.
> https://doi.org/10.1140/epjc/s10052-021-09357-5
> [Full article PDF][1]
&[Wolfram Notebook][2]
[1]: https://link.springer.com/content/pdf/10.1140/epjc/s10052-021-09357-5.pdf
[2]: https://www.wolframcloud.com/obj/f238f0e2-344d-4785-8b0a-37edefbb7bf1Andrzej Hryczuk2021-10-22T15:57:24ZHow to join a Dataset as a column to another dataset?
https://community.wolfram.com/groups/-/m/t/2389792
I am trying to Import the titanic dataset from ExampleData, and convert it to a Dataset. My code so far is as follows:
trainData = ExampleData[{"MachineLearning", "Titanic"}, "TrainingData"];
X = Keys[trainData]
Y = Values[trainData]
dsX = Dataset[X]
dsY = Dataset[Y]
How do I now add dsY as a column to dsX? I tried with Join and Append but somehow could not get through. Any help is deeply appreciated.Abhijit Mustafi2021-10-21T11:41:30ZInconsistent TimelinePlot Layout when using time intervals
https://community.wolfram.com/groups/-/m/t/2387374
When processing usage logs from an online conferencing platform, I wanted to plot time intervals in H:MM format in TimelinePlot which shows the following issues:
1. It does not display the intervals consistently i.e. one timeline is grouped whereas the other is stacked in the same plot. The display cannot be changed in PlotLayout.
2. The vertical axis cuts through the timelines i.e. are not aligned. Manually setting PlotRange.did not help.
As an example, I provide the data to generate the TimelinePlot. When I replace the intervals by e.g. DateObject[{year}] format, all works fine.
Is there an issue with the TimelinePlot or I am missing something? Thanks.
<|"Name1" -> {Interval[{DateObject[{2021, 10, 15, 19, 1, 18.`},
"Instant", "Gregorian", -5.`],
DateObject[{2021, 10, 15, 20, 7, 28.`}, "Instant",
"Gregorian", -5.`]}]},
"Name2" -> {Interval[{DateObject[{2021, 10, 15, 19, 1, 29.`},
"Instant", "Gregorian", -5.`],
DateObject[{2021, 10, 15, 19, 51, 3.`}, "Instant",
"Gregorian", -5.`]}],
Interval[{DateObject[{2021, 10, 15, 19, 53, 29.`}, "Instant",
"Gregorian", -5.`],
DateObject[{2021, 10, 15, 20, 6, 36.`}, "Instant",
"Gregorian", -5.`]}]},
"name3" -> {Interval[{DateObject[{2021, 10, 15, 19, 1, 30.`},
"Instant", "Gregorian", -5.`],
DateObject[{2021, 10, 15, 19, 1, 39.`}, "Instant",
"Gregorian", -5.`]}],
Interval[{DateObject[{2021, 10, 15, 19, 1, 40.`}, "Instant",
"Gregorian", -5.`],
DateObject[{2021, 10, 15, 19, 57, 19.`}, "Instant",
"Gregorian", -5.`]}]},
"name4" -> {Interval[{DateObject[{2021, 10, 15, 19, 1, 41.`},
"Instant", "Gregorian", -5.`],
DateObject[{2021, 10, 15, 19, 1, 55.`}, "Instant",
"Gregorian", -5.`]}],
Interval[{DateObject[{2021, 10, 15, 19, 1, 56.`}, "Instant",
"Gregorian", -5.`],
DateObject[{2021, 10, 15, 20, 5, 59.`}, "Instant",
"Gregorian", -5.`]}]},
"name5" -> {Interval[{DateObject[{2021, 10, 15, 19, 1, 55.`},
"Instant", "Gregorian", -5.`],
DateObject[{2021, 10, 15, 19, 26, 1.`}, "Instant",
"Gregorian", -5.`]}],
Interval[{DateObject[{2021, 10, 15, 19, 45, 1.`}, "Instant",
"Gregorian", -5.`],
DateObject[{2021, 10, 15, 20, 5, 55.`}, "Instant",
"Gregorian", -5.`]}]},
"name6" -> {Interval[{DateObject[{2021, 10, 15, 19, 5, 22.`},
"Instant", "Gregorian", -5.`],
DateObject[{2021, 10, 15, 19, 5, 31.`}, "Instant",
"Gregorian", -5.`]}],
Interval[{DateObject[{2021, 10, 15, 19, 5, 32.`}, "Instant",
"Gregorian", -5.`],
DateObject[{2021, 10, 15, 20, 5, 58.`}, "Instant",
"Gregorian", -5.`]}]},
"Charles Packard" -> {Interval[{DateObject[{2021, 10, 15, 19, 27,
2.`}, "Instant", "Gregorian", -5.`],
DateObject[{2021, 10, 15, 20, 5, 54.`}, "Instant",
"Gregorian", -5.`]}]}|>;
TimelinePlot[%]Dave Middleton2021-10-18T17:52:21ZColorizing region intersections
https://community.wolfram.com/groups/-/m/t/2388720
I am trying to build this image in Mathematica using regions:
![wikipedia constructive solid geometry][1]
The components are here:
Graphics3D[
{
Red,
Cuboid[-{.5, .5, .5}, {.5, .5, .5}],
Blue, Sphere[{0, 0, 0}, .65],
Green,
{#, GeometricTransformation[#, RotationMatrix[Pi/2, {0, 1, 0}]],
GeometricTransformation[#, RotationMatrix[Pi/2, {1, 0, 0}]]} & [
Cylinder[{{0, 0, -.8}, {0, 0, .8}}, .3]]
}, Boxed -> False
]
![output 1][2]
I can generate the region using the following code:
RegionDifference[
RegionIntersection[
BoundaryDiscretizeGraphics[Cuboid[-{.5, .5, .5}, {.5, .5, .5}]],
BoundaryDiscretizeGraphics[Ball[{0, 0, 0}, .65],
MaxCellMeasure -> 0.0005]
],
RegionUnion[
BoundaryDiscretizeGraphics[Cylinder[{{0, 0, -.8}, {0, 0, .8}}, .3],
MaxCellMeasure -> 0.0005],
Region[TransformedRegion[
BoundaryDiscretizeGraphics[
Cylinder[{{0, 0, -.8}, {0, 0, .8}}, .3],
MaxCellMeasure -> 0.0005], RotationTransform[Pi/2, {0, 1, 0}]]],
TransformedRegion[
BoundaryDiscretizeGraphics[Cylinder[{{0, 0, -.8}, {0, 0, .8}}, .3],
MaxCellMeasure -> 0.0005], RotationTransform[Pi/2, {1, 0, 0}]]
]
]
![Output 2][3]
But I have not figured out how to get the proper surfaces colored properly. Any idea?
Thank you,
Luc
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2021-10-19at8.11.08AM.png&userId=1791006
[2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2021-10-19at8.14.09AM.png&userId=1791006
[3]: https://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2021-10-19at8.16.08AM.png&userId=1791006Luc Barthelet2021-10-19T15:17:30ZProblem using Piecewise with NDSolve
https://community.wolfram.com/groups/-/m/t/892695
I'm using an interpolation function defined over a limited range & using "Piecewise" to extend the range. This "Piecewise" function defines the derivative in "NDSolve." The result seems to be correct, but an error message results indicating that the interpolation function is being asked to extrapolate out of its defined range. I have used "Piecewise" in the past with "NDSolve" without this error. Using "Integration" to integrate the "Piecewise" function doesn't generate the error message. Here is a simplified version of the code:
hf= Interpolation[{{0, 0}, {1, 0.4}, {2, 1.2}, {4.7, 3.4}, {5, 3.4}, {5.4, 3.3}, {9, 1.8}, {12.5, 1}, {16, 0.1}, {17, 0}}, InterpolationOrder -> 1];
h[t_] := Piecewise[{{hf[t], 0 <= t <= 17}}];
ih = NDSolveValue[{ih'[t] == h[t], ih[0] == 0}, ih, {t, 0, 30}]
{Integrate[h[t], {t, 0, 30}], ih[30]}
Am I doing something wrong? Comments please. Thank you.David Barrows2016-07-22T21:18:18ZA way to display calculation steps in Mathematica 12.3 ?
https://community.wolfram.com/groups/-/m/t/2389864
Hello dear Mathematica community, I did not know in which
group I should put the question but I hope here I am halfway right.
Is there a command or another way in Mathematica 12.3 to display the calculation steps behind the calculations of a thing?
That would be great to control certain tasks that may even still be calculated by hand and learn with it.
With kind regards
ChristianChristian Ebert2021-10-21T13:40:05ZFixed points of coupled NLD involving transcendental functions
https://community.wolfram.com/groups/-/m/t/2389561
I have the Thomas system at hand and want to find out the fixed points of the equation using Mathematica for the whole range of the parameter. The system of equations are
$$ x'[t]=-b*x[t]+sin[y[t]]$$
$$ y'[t]=-b*y[t]+sin[z[t]]$$
$$ z'[t]=-b*z[t]+sin[x[t]]$$
where b ranges from 0 to 1. I have tried the following mathematica code,
eqns={x'[t]=-b*x+Sin[y],y'[t]=-b*y+Sin[z],z'[t]=-b*z+Sin[x]};
soln=Solve[eqns==0,{x,y,z}]
For this I got an error "This system cannot be solved with the methods available to Solve".
How can I solve the above system of equations ? How can I get a full picture of the fixed points?vijay arjun2021-10-21T05:51:57ZFitting data with error terms?
https://community.wolfram.com/groups/-/m/t/2386662
I have the following dataset:
![parabola][1]
which is generated by `data`:
data={
{-5, Around[55., 3.42]},
{-4, Around[37., 2.13]},
{-3, Around[23., 3.60]},
{-2, Around[13., 2.69]},
{-1, Around[7., 2.30]},
{0, Around[5., 3.87]},
{1, Around[7., 2.94]},
{2, Around[13., 2.29]},
{3, Around[23., 3.48]},
{4, Around[37., 3.70]},
{5, Around[55., 3.25]}
}
This is actually the plot of
![enter image description here][2]
plus some random error.
Now I want to find a fit for this dataset. How do I take into consideration the uncertainty of the measurements? I didn't understand it from the documentation.
NonlinearModelFit[Thread[{data[[All, 1]], data[[All, 2]]}],
a x^2 + b, {a, b}, x, VarianceEstimatorFunction -> (1 &),
Weights -> Map[#[[2]]["Uncertainty"] &, data]]
I should break down this code block for you:
- `Thread[{data[[All, 1]], data[[All, 2]]}]` makes a list of {{x<sub>1</sub>,y<sub>1</sub>},{x<sub>2</sub>,y<sub>2</sub>},...}
- ax<sup>2</sup>+b is the model to fit
- `VarianceEstimatorFunction -> (1 &), Weights -> Map[#[[2]]["Uncertainty"] &, data]` This is an option I add to `NonlinearModelFit` that according to the [documentation][3]
> Using [the above] ∆y<sub>i</sub> is treated as the known uncertainty of measurement Subscript[y, i], and parameter standard errors are effectively computed only from the weights.
- `Map[#[[2]]["Uncertainty"] &, data]` returns a list of the uncertainties for the points y<sub>i</sub>'s.
But the result I get for this line of code is "too good":
(* FittedModel[5. + 2. x^2 ] *)
What is wrong? Were the uncertainties considered at all?
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=7390parabola.png&userId=1344988
[2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=2x5.png&userId=1344988
[3]: https://reference.wolfram.com/language/ref/NonlinearModelFit.htmlEhud Behar2021-10-17T19:37:43ZIs there a problem with ContourPlot[] function?
https://community.wolfram.com/groups/-/m/t/2390040
Attached is an image of a CountourPlot. As you can observe, there is a problem with the contour lines at the center of the plot. I hope it can be repaired soon.
![enter image description here][1]
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=4793Bild1.png&userId=1369267Jürgen Kanz2021-10-21T14:56:09Z[WSS21] Non-trivial homotopies of arbitrary hypergraphs and their solitons
https://community.wolfram.com/groups/-/m/t/2311778
![enter image description here][1]
&[Wolfram Notebook][2]
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2021-07-13at20.46.05.png&userId=2311756
[2]: https://www.wolframcloud.com/obj/8eddab85-6eae-4c2b-bee8-597148e5c720Vladyslav Kuchkin2021-07-13T16:24:08ZBiradial matrix: insights into space-time geometry
https://community.wolfram.com/groups/-/m/t/2390235
&[Wolfram Notebook][1]
[Original NB]: https://www.wolframcloud.com/obj/7e02318b-b4a3-4c62-a296-687d26af2121
[1]: https://www.wolframcloud.com/obj/3dc1e50a-57cb-47eb-ab05-f4822af828b8Russell Kramer2021-10-21T16:01:19ZClean package update for API/FormFunctions on Wolfram Cloud?
https://community.wolfram.com/groups/-/m/t/1111828
[Cross posted on mathematica.stackexchange](https://mathematica.stackexchange.com/q/147330/5478)
# TLDR
There is a pool of kernels/sessions available for each user, you don't have control over the pool, only over specific kernel you currently evaluate in. Re-upload of a package should be followed by quit on every kernel where previous version of a package was used. I failed to find tools for that.
# Background
I'm developing a package which I want to deploy to my Wolfram Public Cloud's account and I want a set of `APIFunctions`/`FormFunctions`/etc to be able to use it.
- `PacletManager` has limited functionality so I'm just uploading package's archive and extracting it to WPC's `$UserBaseDirectory / Applications /`.
- `APIFunctions` and friends have form:
APIFunction[{}, (Needs["TestPackage`"];Symbol["TestPackage`api2"][...]) &]
*I use `Symbol` because otherwise ``TestPackage` `` definitions are uploaded and I want to avoid that. There should be one code source, the package in `$UserBaseDirectory`.*
# Problem
The problem is that kernels' management on WPC is a closed black box. If you call the api twice, each time it uses one of the kernels in the pool. It also applies to `CloudEvaluate` etc.
`$UserBaseDirectory` is shared but `Get` will find the current version ony for current kernel.
If in another kernel ``TestPackage` `` was loaded earlier, `Needs` will not load the current version there :-/ **I don't wan't to `Get` in my APIFunctions**, a proper way is to call `Needs`.
And there is no way to `Quit` every available kernel.
# Example
is worth of 10^3 words:
First we will mimic a package upload, 10 times. So it was uploaded, something was fixed it was uploaded again etc:
packageTemplate = StringTemplate["
BeginPackage[\"TestPackage<*\"`\"*>\"];
myValue = \"``\"
EndPackage[];
"];
Do[
CloudExport[packageTemplate@RandomReal[], "Text", "TestPackage.m"]
; CloudEvaluate[
CopyFile[
"TestPackage.m"
, StringRiffle[
{$UserBaseDirectory, "Applications", "TestPackage.m"}
, "/"
]
, OverwriteTarget -> True
]
; Get @ "TestPackage`"
]
, {10}
]
Now let's call code based on the package 25 times:
Table[
CloudEvaluate[
Needs["TestPackage`"]
; {$SessionID, Symbol["TestPackage`myValue"]}
]
, {25}
] // CountBy[Last] // Normal // Column
[![enter image description here][1]][1]
7 different results, I expect only one variant, from the last deployment.
# The question
How to upload a package and clean properly, as we can see `Get` after the upload only affects one particular kernel/sessopm. `CloudEvaluate@Quit[]` won't help either.
How to reset them all?
# Requirements
APIFunction[{}, (Get["TestPackage`"];Symbol["TestPackage`api2"][...]) &]
could solve it but if the package contains `Protected`/`Locked` symbols you will get a flood of errors. And because of the same reason you can't `ClearAll` symbols. And obviously you can't `Quit` in `ApiFunction`.
[1]: https://i.stack.imgur.com/boIM7.pngKuba Podkalicki2017-05-31T18:57:20ZNot able to solve an integration?
https://community.wolfram.com/groups/-/m/t/2389657
I wanted to integrate following integral. But its giving the solution in integral dV form. Is there any other way to get to exact solution?
Please Help.
Following is the problem:
Integrate[-((3 p V + q Log[V] -
3 p V Log[V])/(3 p Log[V])) - ((-324 p^2 V^2 -
108 p t Log[V] + 162 p^2 V^2 Log[V] - 36 q^2 Log[V]^2 +
108 p r Log[V]^2)/(9 2^(2/3) p Log[
V] (-11664 p^3 V^3 - 5832 p^2 t V Log[V] +
8748 p^3 V^3 Log[V] - 5832 k p^2 t Log[V]^2 -
1944 p q t Log[V]^2 + 5832 p^2 t V Log[V]^2 -
1944 p^3 V^3 Log[V]^2 - 432 q^3 Log[V]^3 +
1944 p q r Log[V]^3 - 5832 p^2 s Log[V]^3 +
Sqrt[(4 (-324 p^2 V^2 - 108 p t Log[V] + 162 p^2 V^2 Log[V] -
36 q^2 Log[V]^2 +
108 p r Log[V]^2)^3 + (-11664 p^3 V^3 -
5832 p^2 t V Log[V] + 8748 p^3 V^3 Log[V] -
5832 k p^2 t Log[V]^2 - 1944 p q t Log[V]^2 +
5832 p^2 t V Log[V]^2 - 1944 p^3 V^3 Log[V]^2 -
432 q^3 Log[V]^3 + 1944 p q r Log[V]^3 -
5832 p^2 s Log[V]^3)^2)]^(1/3)))) + (1/(18 2^(1/
3) p Log[V])) (-11664 p^3 V^3 - 5832 p^2 t V Log[V] +
8748 p^3 V^3 Log[V] - 5832 k p^2 t Log[V]^2 -
1944 p q t Log[V]^2 + 5832 p^2 t V Log[V]^2 -
1944 p^3 V^3 Log[V]^2 - 432 q^3 Log[V]^3 + 1944 p q r Log[V]^3 -
5832 p^2 s Log[V]^3 +
Sqrt[(4 (-324 p^2 V^2 - 108 p t Log[V] + 162 p^2 V^2 Log[V] -
36 q^2 Log[V]^2 +
108 p r Log[V]^2)^3 + (-11664 p^3 V^3 -
5832 p^2 t V Log[V] + 8748 p^3 V^3 Log[V] -
5832 k p^2 t Log[V]^2 - 1944 p q t Log[V]^2 +
5832 p^2 t V Log[V]^2 - 1944 p^3 V^3 Log[V]^2 -
432 q^3 Log[V]^3 + 1944 p q r Log[V]^3 -
5832 p^2 s Log[V]^3)^2)]^(1/3)), V]ISHA ARORA2021-10-21T06:22:17ZConverting JSON to custom formatted CSV
https://community.wolfram.com/groups/-/m/t/2386514
I have a folder of about a million JSON files and I wrote this to convert them quickly to CSV, but the formatting is not correct for the software I'm feeding them into.
Here's the code I'm using:
Do[(Export["CSV_OUT_" <> FileBaseName@jsonlist[[i]] <> ".csv",
Import[jsonlist[[i]]]]),{i, 1, Length[jsonlist]}];
The result looks like this:
"""from"" -> {""address_city"" -> ""MORGANVILLE"", ""address_country"" -> ""UNITED STATES"", ""address_line1"" -> ""123 TEST ST"", ""address_line2"" -> ""STE 1"", ""address_state"" -> ""NJ"", ""address_zip"" -> ""07751"", ""company"" -> """", ""name"" -> ""ELENA CROSS""}" """id"" -> ""sfm_c4kjaugl7u8psvqfatp0""" """imb_code"" -> ""897714123456789""" """mail_date"" -> """"" """mail_type"" -> ""usps_first_class""" etc.
The correct results would look like this in CSV format:
from address_city,address_country,address_line1,address_line2,address_state,address_zip,company,name,id,imb_code,mail_date,mail_type,object,press_proof,size,target_delivery_date,,to address_city,address_country,address_line1,address_line2,address_state,address_zip,company,name MORGANVILLE,UNITED STATES,123 TEST ST,STE 1,NJ,7751,,ELENA CROSS,sfm_c4kjaugl7u8psvqfatp0,897714123456789,,usps_first_class,
How can I export correctly formatted CSV files like the one above quickly?Bob Hallam2021-10-16T19:17:29Z