Community RSS Feed
http://community.wolfram.com
RSS Feed for Wolfram Community showing any discussions in tag Mathematics sorted by activeInterpolating a 3D vector field. - is it possible?
http://community.wolfram.com/groups/-/m/t/1038013
Hello, So I'm trying to take a 3D magnetic field, and then interpolate it so I can take the differentials and plot nice magnetic fields. I'm struggling to tell interpolate how to interpolate my data - I get an error reading
> ListInterpolation::inhr: Requested order is too high; order has been reduced to {3,3,3,2}
Which I don't quite understand.
The data is fine because I can plot it correctly using ListVectorPlot3D
Minimum Working Example:
(*define the vectors for each dimension*)
vx = ConstantArray[1, {5, 5, 5}]
vx = ConstantArray[3, {5, 5, 5}]
vy = ConstantArray[2, {5, 5, 5}]
(*put each dimension to gether to get a 3D vector field - i.e. each point has a 3 vector at it *)
together =
ArrayReshape[Transpose[Flatten /@ {vx, vy, vz}], {5, 5, 5, 3}]
interpolation = ListInterpolation[together]
ListVectorPlot3D[together]
VectorPlot3D[interpolation[x, y, z], {x, 1, 5}, {y, 1, 5}, {z, 1, 5}]
Can interpolate not work with this complicated data structures, i.e. might they be scalars. Would it then be possible to combine 3 interpolation functions?Tomi Baikie2017-03-23T11:02:27ZAvoid problem of "Recursion depth of 1024 exceeded during evaluation of...?
http://community.wolfram.com/groups/-/m/t/1037435
Hello, everybody! I am facing a problem called "Recursion depth of 1024 exceeded during evaluation of ...". I know that it occurs because I cannot obtain an explicit solution of y. But I do not know how to write the code to realize it. Any one can help me to solve it? Thank you. I post an attachment below.EditProfile FillName2017-03-22T13:41:29ZTesting for beauty
http://community.wolfram.com/groups/-/m/t/1037946
What do you think of the idea of automatically judging if a piece of data was beautiful? This could mean the data in an image (ImageData) or maybe the result of a computation (e.g. CellularAutomaton), or anything, although I am thinking of a list or an array of numbers primarily.
My first thought was that there are many filters for image processing, but I don't know which might be useful. The next thing I think of is mathematical transforms. For example, taking the Fourier or Hadamard transform you expect the coefficients to decay, and if they don't then that would not be nice.
This code deletes the constant term and does some measure of the variance, using Mean as a shortcut to counting the 0's and 1's, those closer to the min than the max respectively without knowing the length or dimension. (Note Fourier does not assume the size is a power of 2 but Hadamard does.)
FourierBeauty[list_] := Mean[1. - Round[Rescale[Abs[Rest[Flatten[Fourier[list]]]]]]]
Maybe for an image this might not be bad. Here is what it picks out of the ExampleData test images:
Grid[{#, ExampleData[#]} & /@
MaximalBy[ExampleData["TestImage"],
FourierBeauty[
ImageData[
Binarize[
ImageResize[
ColorConvert[ExampleData[#], "Grayscale"], {64, 64}]]]] &],
Frame -> All]
![enter image description here][1]
but here are the CAs it likes the most.
MaximalBy[Range[0, 255],
Sum[FourierBeauty[ CellularAutomaton[#, RandomInteger[1, 2^8], {{0, 2^8 - 1}}]], 100] &]->{1, 3, 5, 17, 57, 87, 119, 127}
[1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=fourier-beauty-image.jpg&userId=23275Todd Rowland2017-03-23T02:46:11ZGlyph Frieze Patterns
http://community.wolfram.com/groups/-/m/t/1032650
Frieze patterns overlap art and math. The design of the base tile in a frieze pattern is artistic, while its repetition can be defined mathematically. This makes frieze patterns a good candidate for exploration with the Wolfram Language.
The bit of code below creates random frieze patterns from font glyphs. I chose sixteen asymmetric glyphs. Others would work, but they should be asymmetric to avoid double symmetries. Here is what the code does:
- randomly select one of the glyphs
- create a random dark color
- randomly rotate the glyph by 45° angles
- crop any excess background
- tile it according to one of the seven frieze patterns
There are 896 possible patterns, not counting the color variations. The results are often startling. Here are a few:
![\[screen shot\]][1]
![\[screen shot\]][2]
![\[screen shot\]][3]
![\[screen shot\]][4]
This suited my need as a small part of a larger project, a sort of school-house trivia game called *Chicken Scratch*. The questions must have a fair amount of randomness so the students reason rather than memorizing answers. For this question, the game presents the frieze pattern and the players choose from the names of four geometric definitions.
The Wolfram Demonstrations Project does have a half-dozen or so demonstrations for exploring frieze patterns. This is the first I've seen that uses glyphs for the base tile design. Though I could turn this into a demonstration, I need to focus on *Chicken Scratch*. Feel free to use this code however you want.
color1 = RGBColor[Table[RandomReal[.6], 3]];
symbol = RandomChoice[{9873, 9730, 38, 9816, 163, 9758, 8730, 8950,
11001, 10729, 10771, 9736, 10000, 9799, 9732, 8623}];
stamp = ImageCrop[
ImageRotate[
Rasterize[
Graphics[{color1,
Style[Text[FromCharacterCode[symbol]], 200]}]], (
RandomInteger[7] \[Pi])/8, Background -> White]];
width = ImageDimensions[stamp][[1]];
frieze = Switch[RandomInteger[{1, 7}],
1, ImageAssemble[Table[stamp, 12]],
2,
top = ImageAssemble[Table[stamp, 12]];
bot = ImageAssemble[Flatten[{
ImageRotate[ImageCrop[stamp, {width/2, Full}, Right], \[Pi]],
Table[ImageRotate[stamp, \[Pi]], 11],
ImageRotate[
ImageCrop[stamp, {width/2, Full}, Left], \[Pi]]}]];
imgLst = ConformImages[{top, bot}];
ImageAssemble[{{imgLst[[1]]}, {imgLst[[2]]}}],
3,
top = ImageAssemble[Table[stamp, 12]];
bot = ImageAssemble[Flatten[{
ImageReflect[ImageCrop[stamp, {width/2, Full}, Left]],
Table[ImageReflect[stamp], 11],
ImageReflect[ImageCrop[stamp, {width/2, Full}, Right]]}]];
imgLst = ConformImages[{top, bot}];
ImageAssemble[{{imgLst[[1]]}, {imgLst[[2]]}}],
4, ImageAssemble[
Riffle[Table[stamp, 6], Table[ImageReflect[stamp, Left], 6]]],
5, ImageAssemble[{Table[stamp, 12],
Table[ImageReflect[stamp], 12]}],
6, ImageAssemble[{Riffle[Table[stamp, 6],
Table[ImageReflect[stamp, Left], 6]],
Riffle[Table[ImageReflect[stamp, Left], 6], Table[stamp, 6]]}],
7, ImageAssemble[{Riffle[Table[stamp, 6],
Table[ImageReflect[stamp, Left], 6]],
Riffle[Table[stamp, 6], Table[ImageReflect[stamp, Left], 6]]}]];
pic = Image[frieze, ImageSize -> {{800}, {100}}]
You may have noticed that my code relies on procedural programming constructs like **switch** and **if**. I have only been using the Wolfram Language for about a year. I'm grateful that the Wolfram Language allows me to use procedural techniques while I learn how to write more elegant function-based code.
Oh, there is a possibility that some of the glyphs won't work on your system because they rely on what fonts you have on your machine. If that's the case, replace the character codes with ones that you do have.
[1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2017-03-16at9.24.33AM.png&userId=788861
[2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2017-03-16at9.27.58AM.png&userId=788861
[3]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2017-03-16at9.27.20AM.png&userId=788861
[4]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2017-03-16at9.25.47AM.png&userId=788861Mark Greenberg2017-03-17T00:12:50ZCreate a plot of vectors using a Do-Loop?
http://community.wolfram.com/groups/-/m/t/1036796
I am trying to create a plot of vectors using a Do-loop and
"Graphics [{Arrow[{....". Within the Do loop I calculate
the beginning (X,Y) and ending coordinates (X1,Y1) for each vector.
Can I use the "Graphics [{Arrow[{" command within a Do-Loop
or do I first have to create a Table? Below is my code.
Terry
A = {
{.79, 1.36}, {.93, 1.38}, {.58, .38}, {.87, .87}, {.83, .79},
{.31, .99}, {.60, .48}, {.60, .87}, {1.64, .15}, {1.11, 1.30},
{.53, .97}, {1.26, .39}, {2.37, .00}, {1.17, 1.76}, {.96, 1.26},
{.56, .46}, {1.17, .20}, {.63, .26}, {1.01, .47}, {.81, .77}};
DI = {-.90, -1.20, 1., -.97, -1.08, -1.53, -.61, -.60,
1.24, -.69, -1.31, .92, 2.39, -.06, -.48, -.82, -.82,
1.11, .66, -.15, -1.08}
Do[MDISC = Sqrt[A[[i, 1]]^2 + A[[i, 2]]^2];
COSX = A[[i, 1]]/MDISC;
COSY = A[[i, 2]]/MDISC;
BIGD = -DI[[i]]/MDISC;
X = BIGD*COSX;
Y = BIGD*COSY;
X1 = (MDISC + BIGD)*COSX;
Y1 = (MDISC + BIGD)*COSY;
Graphics[{Arrow[{{X, Y}, {X1, Y1}}]}], {i, 20}]Terry Ackerman2017-03-21T11:42:18ZCorrect a NDSolve approach when an argument contains an InverseFunction?
http://community.wolfram.com/groups/-/m/t/972466
We have a thin crystal of thickness d illuminated uniformly from the left at an intensity lgti[0, t] of unity. The crystal is composed of a photo reactive species *a* which absorbs light. Inside the crystal at location x and time t the photo chemical reaction leads to a local concentration of *a* given as a[x, t] in the code below.
Code to generate the concentration, a[x, t], and light intensity, lgti[x, t], within the crystal is straightforward and is shown.
The cause of the errors generated using the code is that in some cases a[x, t] does not return a number.These exceptional cases are near a known limit of the InverseFunction and a[x, t] in these cases could be given the values unity if found. My problem is that using NumberQ inside a Module definition of a[x, t] always gives false because ligti[x, t] is unevaluated.
The starting code is shown but see the attached notebook.
ClearAll[a, x, t, eqns, \[Sigma]N, lgti, soln, t0, d, tmax]
\[Sigma]N = 1.78*10^4; d = 0.001; tmax = 3000.0;
a[x_, t_] := InverseFunction[(1.8996253051848473`/lgti[x, t] *
(162.99559471365637` Log[1 + 8.98898678414097` (1 - #1)] -
172.98458149779734` Log[#1]) ) &
] [t]
eqns = {D[lgti[x, t], x ] == - \[Sigma]N a[x, t ] lgti[x, t],(* Beer's Law *)
lgti[0, t] == 1,
lgti[x, 0] == Exp[-\[Sigma]N x]
};
t0 = AbsoluteTime[];
soln = NDSolve[eqns, lgti, {x, 0, d}, {t, 0, tmax},
MaxStepFraction -> 0.01] [[1]];
Print[ToString[(AbsoluteTime[] - t0)/60] <> " minutes"]
Any advice on how to code a[x, t] so that lgti[x, t] appears as a number within the body of the code would be welcome.
An alternate approach would also be well received.Mervin Hanson2016-12-01T00:35:14Z[GIF] Elaborating on Arrival's Alien Language, Part I., II. & III.
http://community.wolfram.com/groups/-/m/t/1034626
I recently watched "Arrival", and thought that some of the dialogue sounded Wolfram-esque. Later, I saw the following blog post:
[Quick, How Might the Alien Spacecraft Work?][1]
Along with many others, I enjoyed the movie. The underlying artistic concept for the alien language reminded me of decade old memories, a book by Stephen Addiss, [Art of Zen][2]. Asian-influenced symbolism is an interesting place to start building a sci-fi concept, even for western audiences.
I also found Cristopher Wolfram's broadcast and the associated files:
[Youtube Broadcast][3]
[Github Files ( with image files ) ][4]
Thanks for sharing! More science fiction, yes!
I think the constraint of circular logograms could be loosened. This leads to interesting connections with theory of functions, which I think the Aliens would probably know about.
The following code takes an alien logogram as input and outputs a deformation according to do-it-yourself formulation of the Pendulum Elliptic Functions:
![Human Animation][5]
## $m=2$ Inversion Coefficients ##
MultiFactorial[n_, nDim_] := Times[n, If[n - nDim > 1, MultiFactorial[n - nDim, nDim], 1]]
GeneralT[n_, m_] := Table[(-m)^(-j) MultiFactorial[i + m (j - 1) + 1, m]/ MultiFactorial[i + 1, m], {i, 1, n}, {j, 1, i}]
a[n_] := With[{gt = GeneralT[2 n, 2]}, gt[[2 #, Range[#]]] & /@ Range[n] ]
## Pendulum Values : $2(1-\cos(x))$ Expansion Coefficients ##
c[n_ /; OddQ[n]] := c[n] = 0;
c[n_ /; EvenQ[n]] := c[n] = 2 (n!) (-2)^(n/2)/(n + 2)!;
## Partial Bell Polynomials ##
Note: These polynomials are essentially the same as the "**BellY**" ( hilarious naming convention), but recursion optimized. See timing tests below.
B2[0, 0] = 1;
B2[n_ /; n > 0, 0] := 0;
B2[0, k_ /; k > 0] := 0;
B2[n_ /; n > 0, k_ /; k > 0] := B2[n, k] = Total[
Binomial[n - 1, # - 1] c[#] B2[n - #, k - 1] & /@
Range[1, n - k + 1] ];
## Function Construction ##
BasisT[n_] := Table[B2[i, j]/(i!) Q^(i + 2 j), {i, 2, 2 n, 2}, {j, 1, i/2}]
PhaseSpaceExpansion[n_] := Times[Sqrt[2 \[Alpha]], 1 + Dot[MapThread[Dot, {BasisT[n], a[n]}], (2 \[Alpha])^Range[n]]];
AbsoluteTiming[CES50 = PhaseSpaceExpansion[50];] (* faster than 2(s) *)
Fast50 = Compile[{{\[Alpha], _Real}, {Q, _Real}}, Evaluate@CES50];
## Image Processing ##
note: This method is a hack from ".jpg" to sort-of vector drawing. I haven't tested V11.1 vectorization functionality, but it seems like this could be a means to process all jpg's and output a file of vector polygons. Anyone ?
LogogramData = Import["Human1.jpg"];
Logogram01 = ImageData[ColorNegate@Binarize[LogogramData, .9]];
ArrayPlot@Logogram01;
Positions1 =
Position[Logogram01[[5 Range[3300/5], 5 Range[3300/5]]], 1];
Graphics[{Disk[#, 1.5] & /@ Positions1, Red,
Disk[{3300/5/2, 3300/5/2}, 10]}];
onePosCentered =
N[With[{cent = {3300/5/2, 3300/5/2} }, # - cent & /@ Positions1]];
radii = Norm /@ onePosCentered;
maxR = Max@radii;
normRadii = radii/maxR;
angles = ArcTan[#[[2]], #[[1]]] & /@ onePosCentered;
Qs = Cos /@ angles;
## Constructing and Printing Image Frames ##
AlienWavefunction[R_, pixel_, normRad_, Qs_, angles_] := Module[{
deformedRadii = MapThread[Fast50, {R normRad, Qs}],
deformedVectors = Map[N[{Cos[#], Sin[#]}] &, angles],
deformedCoords
},
deformedCoords =
MapThread[Times, {deformedRadii, deformedVectors}];
Show[ PolarPlot[ Evaluate[
CES50 /. {Q -> Cos[\[Phi]], \[Alpha] -> #/10} & /@
Range[9]], {\[Phi], 0, 2 Pi}, Axes -> False,
PlotStyle -> Gray],
Graphics[Disk[#, pixel] & /@ deformedCoords], ImageSize -> 500]]
AbsoluteTiming[ OneFrame =
AlienWavefunction[1, (1 + 1)* 1.5/maxR, normRadii, Qs, angles]
](* about 2.5 (s)*)
![Alien Pendulum][6]
## Validation and Timing ##
In this code, we're using the magic algorithm to get up to about $100$ orders of magnitude in the half energy, $50$ in the energy. I did prove $m=1$ is equivalent to other published forms, but haven't found anything in the literature about $m=2$, and think that the proving will take more time, effort, and insight (?). For applications, we just race ahead without worrying too much, but do check with standard, known expansions:
EK50 = Normal@ Series[D[ Expand[CES50^2/2] /. Q^n_ :> (1/2)^n Binomial[n, n/2], \[Alpha]], {\[Alpha], 0, 50}];
SameQ[Normal@ Series[(2/Pi) EllipticK[\[Alpha]], {\[Alpha], 0, 50}], EK50]
Plot[{(2/Pi) EllipticK[\[Alpha]], EK50}, {\[Alpha], .9, 1}, ImageSize -> 500]
Out[]:= True
![Approximation Validity][7]
This plot gives an idea of approximation validity via the time integral over $2\pi$ radians in phase space. Essentially, even the time converges up to, say, $\alpha = 0.92$. Most of the divergence is tied up in the critical point, which is difficult to notice in the phase space drawings above.
Also compare the time of function evaluation:
tDIY = Mean[ AbsoluteTiming[Fast50[.9, RandomReal[{0, 1}]] ][[1]] & /@ Range[10000]];
tMma = Mean[AbsoluteTiming[JacobiSN[.9, RandomReal[{0, 1}]] ][[1]] & /@ Range[10000]];
tMma/tDIY
In the region of sufficient convergence, Mathematica function **JacobiSN** is almost 20 times slower. The CES radius also requires a function call to **JacobiCN**, so an output-equivalent **AlienWavefunction** algorithm using built-in Mathematica functions would probably take at least 20 times as long to produce. When computing hundreds of images this is a noticeable slow down, something to avoid ! !
Also compare time to evaluate the functional basis via the Bell Polynomials:
BasisT2[n_] := Table[BellY[i, j, c /@ Range[2 n]]/(i!) Q^(i + 2 j), {i, 2, 2 n, 2}, {j, 1, i/2}];
SameQ[BasisT2[20], BasisT[20]]
t1 = AbsoluteTiming[BasisT[#];][[1]] & /@ Range[100];
t2 = AbsoluteTiming[BasisT2[#];][[1]] & /@ Range[25];
ListLinePlot[{t1, t2}, ImageSize -> 500]
![Series Inverse][8]
The graph shows quite clearly that careful evaluation via the recursion relations changes the complexity of the inversion algorithm to polynomial time, $(n^2)$, in one special example where the forward series expansions coefficients have known, numeric values.
## Conclusion ##
We show proof-of-concept that alien logograms admit deformations that preserve the cycle topology. Furthermore we provide an example calculation where the "human" logogram couples to a surface. Deformation corresponds to scale transformation of the logogram along the surface. Each deformation associates with an energy.
Invoking the pendulum analogy gives the energy a physical meaning in terms of gravity, but we are not limited to classical examples alone. The idea extends to arbitrary surfaces in two, three or four dimensions, as long as the surfaces have local extrema. Around the extrema, there will exist cycle contours, which we can inscript with the Alien logograms. This procedure leads readily to large form compositions, especially if the surface has many extrema. Beyond Fourier methods, we might also apply spherical harmonics, and hyperspherical harmonics to get around the limitation of planarity.
The missing proof... Maybe later. LOL! ~ ~ ~ ~ Brad
And in the Fanfiction Voice:
Physicist : "It should be no surprise that heptapod speech mechanism involves an arbitrary deformation of the spacetime manifold."
Linguist : "Space-traveling aliens, yes, of course they know math and physics, but Buddhist symbology, where'd they learn that?"
[1]: http://blog.stephenwolfram.com/2016/11/quick-how-might-the-alien-spacecraft-work/
[2]: https://books.google.com/books/about/Art_of_Zen.html?id=4jGEQgAACAAJ
[3]: https://www.youtube.com/watch?v=8N6HT8hzUCA&t=4992s
[4]: https://github.com/WolframResearch/Arrival-Movie-Live-Coding
[5]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Deformation.gif&userId=234448
[6]: http://community.wolfram.com//c/portal/getImageAttachment?filename=AlienPendulum.png&userId=234448
[7]: http://community.wolfram.com//c/portal/getImageAttachment?filename=EllipticK.png&userId=234448
[8]: http://community.wolfram.com//c/portal/getImageAttachment?filename=BellPolynomial.png&userId=234448Brad Klee2017-03-18T20:23:59Z[✓] Use SetDelayed for a selected set of indices?
http://community.wolfram.com/groups/-/m/t/1036976
I'm trying to define some delayed values and let mathematica do the simplification for me during the course of computation. Here is a minimal work example:
x[i_] := y[i];
Mx = Table[x[i] + 2, {i, 1, 10}];
My = Table[y[i], {i, 1, 10}];
difference = Mx - My
The output is simply `{2, 2, 2, 2, 2, 2, 2, 2, 2, 2}`. What I'm eager to know is if there is a way that I can define the delayed value **only** for x[i] with 2<=i<=10 (i.e. a selected subset of the indices), so that the final result would be something like `{x[1]-y[i]+2, 2, 2, 2, 2, 2, 2, 2, 2, 2}`. That is, every entry of the result is reduced by taking the delayed values but the first one. Thanks!!K X2017-03-21T17:20:56ZSolve an equation with a Piecewise function?
http://community.wolfram.com/groups/-/m/t/1035180
Hello I'm new to Mathematica, though I know a few about it. I'm trying to find a group of 2 values for Piecewise function changing with x, but I constantly have a problem with Solve producing a lot of errors can you tell me where is my mistake in this ? Whole thing is in attached file, Basically its:
F(x)=Piecewise[...](x,wl,wp)
Solve[MaxValue[F,x]/MinValue[F,x]==1.15,{wl,wp}] Or
CylindricalDecomposition[1.1<=MaxValue[F,x]/MinValue[F,x]<=1.2,{wl,wp}]
So I'm trying to get wl and wp values for optimization, but certainly I'm doing something wrong, please help.Pio Tyldens2017-03-19T15:24:41Z[✓] Manipulate of a 2-D plot?
http://community.wolfram.com/groups/-/m/t/1033865
I am trying to create a plot of a logistic function with parameters AHAT and MDIF. The values of these parameters depend up
underlying parameters A and DIF and an underlying ability distribution with a covariance omega and mean vector mu. I have to go through several steps to determine AHAT and MDIF. I would like to create a plot where I can manipulate sigma, mu1 and mu2 to see how it affects the
logistic curve. I can't figure out how to create the plot. Leaving the variable sigma and mu1 and mu2 in the expressions at the outside
will not work. I have attached a MSWord document with the code. Does any have suggestions?
A={{1.2,.4},{.8,.5},{.9,1.0},{1.3,.5},{.6,.9}};u={{μ1,μ2}};
DIF={{.5},{.7},{1.0},{-1.},{2.0}};
Ω={{σ,1},{1,σ}}
L=CholeskyDecomposition[Ω]
W=Eigenvectors[Transpose[L].Transpose[A].A.L]
AM=List[A[[1]]]
W1M=List[W[[1]]]
W2M=List[W[[2]]]
AHAT=AM.Transpose[W1M]/Sqrt[2.89+AM.Transpose[W2M].W2M.Transpose[AM]]
MDIF=(DIF[[1]]-AM.Transpose[u])/AM.Transpose[W1M]
Manipulate[Plot[{(1/(1+Exp[-1.7*AHAT*(θ-MDIF)])),},{θ,-3,3},AxesLabel->{θ,p}],{σ,1,3},{μ1,-2,2},{μ2,-2,2}]Terry Ackerman2017-03-17T19:28:15ZSubscript more than one character? a_(2)=3a_{2-1}
http://community.wolfram.com/groups/-/m/t/1036556
How do you get wolfram to read the 2-1 completely subscripted, or as a "base" a_(2)=3a_{2-1} It only sends the 2 to the base of a at the end of the equation!!!! never the -1 ugh..... plz helpRudy Ram2017-03-21T01:13:06ZMake blinking work for all percentages of the screens?
http://community.wolfram.com/groups/-/m/t/1036511
I'm building interactive material for my classes
I wish there were flickering, aids, questions, etc.
I am using two panels, one for the graphics (left panel ) and the other for the explanations (right panel).
I control the graph from the right panel.
In this example I present, the blinking does not run with all percentages of the screens. I do not know why.
For the example I present there is no blinking in 110% and 115% of the screen.
In general, the examples I am developing the flicker fails for different percentages.
I.m using 11.1 (the same with 11.0 and 10.x)
Hypothesis:
I am not using StringForm correctly.
My definitions are not yet appropriate.
Thanks in advance.Ernesto Espinosa2017-03-21T00:17:43ZFindClusters versus ClusteringComponents?
http://community.wolfram.com/groups/-/m/t/960586
Dear all,
I just found out that there's a difference in the number clusters retrieved when using FindClusters and ClusteringComponents for the same data set, even when completely the same settings are used:
Do[
koppels = RandomReal[{0, 100}, 500];
cl = FindClusters[koppels, DistanceFunction -> EuclideanDistance, Method -> "Optimize"];
indices2 = ClusteringComponents[koppels, Automatic, 1, DistanceFunction -> EuclideanDistance, Method -> "Optimize"];
Print[{First@Dimensions[cl], Max[indices2]}];,
{i, 1, 6}]
{2,2}
{2,2}
{1,2}
{2,2}
{1,2}
{1,2}
This shouldn't be the case, because the same clusters should be found either way.
Does someone have an idea of what's going on here?
Thanks for the information!
JanJan Baetens2016-11-10T18:00:40ZCalculate (A*Nabla)B ?
http://community.wolfram.com/groups/-/m/t/1035972
Does anyone how to write (A*Nabla)B in Mathematica?
As far as I understood I can also write (A*Nabla)B=Nabla(A*Transposed[B])-B(Nabla*A), but I can't get this to work either as I don't know how to write A*Transposed(B).
Any ideas?mkssion2017-03-20T18:28:47ZSolve an Elliptic PDE for u[x,y] with the rhs given by numerical f[u]?
http://community.wolfram.com/groups/-/m/t/1035422
I have a somewhat unusual mathematical problem. I need to solve numerically a second order elliptic PDE for u[x,y] with the right hand side given by numerical function F[u], that is, some give function of u, not of [x,y].
In 1D things work well
(* make interpolation of a linear function: *)
FofA = Interpolation[Table[{x, x}, {x, 0, 1, 10^-2}]];
(*construct a numerical function from the interpolation: *)
FofA1[x_] := FofA[z] /. z -> x
(* Find solutions for u’ = FofA1[u] *)
uofx = Flatten[
NDSolve[{Dt[u[x], x] == (FofA1[u[x]]), u[1] == 1},
u, {x, 0, 1}]].{1};
(* Plot it and compare with analytical *)
Show[{Plot[u[x] /. uofx, {x, 0, 1}, PlotRange -> All],
Plot[E^(-1 + x), {x, 0, 1}]}]
But in 2D it fails. One of the hints, I think is: if I try to solve Poisson equation in the form
D[u[x, y], {x, 2}] + D[u[x, y], {y, 2}] == u[x, y]
the NDSolveValue works OK, but it fails for
D[u[x, y], {x, 2}] + D[u[x, y], {y, 2}] == u[x, y]^{1.}
(when the rhs is numerically evaluated)
Thanks a lot for the insight.Maxim Lyutikov2017-03-19T22:24:02Z[✓] Locator constrained by polygon and NSolve
http://community.wolfram.com/groups/-/m/t/1035196
Dear Community,
I have a polygon with a constrained locator in it. I would like to draw a horizontal line from the locator towards the left boundary of the polygon, which is also given by a stewise function called qgHSZ. I try to achieve this with NSolve, but I get some strange warnings, like
"Part 2 of {0.5,10.} does not exist" Why??
"NSolve was unable to solve the system with inexact coeficients, etc." Not clear either. If I test NSolve below the plot, it works fine.
What do I do wrong? Notebook attached.
Tx for the kind help in advance,
regards, AndrasAndras Gilicz2017-03-19T21:32:01Z[✓] Solve the highlighted area?
http://community.wolfram.com/groups/-/m/t/1033774
How can I solve highlighted area?
![enter image description here][1]
[1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=area.PNG&userId=977975Bayasgalan Bayasgalan2017-03-18T05:33:46ZSolve definite integrals?
http://community.wolfram.com/groups/-/m/t/1034805
Hello,
Please, I am trying to solve definite integral and its work but the results not simplified.
F = Integrate[(x^4*Exp[x])/(Exp[x] - 1)^2, {x, 0, 44}]
This is the result
(1/(15 (-1 + E^44)))4 (-\[Pi]^4 +
E^44 (\[Pi]^4 +
30 (-1874048 + 42592 Log[-1 + E^44] - 2904 PolyLog[2, 1/E^44] -
132 PolyLog[3, 1/E^44] - 3 PolyLog[4, 1/E^44])) +
30 (-42592 Log[-1 + E^44] +
3 (468512 + 968 PolyLog[2, 1/E^44] + 44 PolyLog[3, 1/E^44] +
PolyLog[4, 1/E^44])))studygroups 20002017-03-19T00:29:08ZUsing NetModel to "fine tune" models with new final layers?
http://community.wolfram.com/groups/-/m/t/1033923
Hi -- First, congrats on 11.1. Support for the 1080 GPU is enough for me to get excited. I also love that I can load pre-trained models using NetModel, as that is an increasingly obvious strategy for problem solving. However, I'm not clear on how I would go about keeping the weights from the lower (feature) layers, while re-training the upper layers. Knowing how thorough you are, I'm sure it's possible, but just not sure how. NetChain lets me build layers, but I don't think it lets me operate on them. NetExtract lets me pull out layers, but I don't want just the model, I'd like to keep the pre-trained weights. Thanks! -- DavidDavid Cardinal2017-03-18T00:07:22Z