« first day (1659 days earlier)      last day (3123 days later) » 

03:15
Hi, guys. Did someone know how to remove the mesh of the following graphic?
pts = Table[{ Cos[2 Pi u/6] Cos[v], Sin[2 Pi u/6] Cos[v], v}, {u, 6}, {v, -1, 1, 1/2}];
f = BSplineFunction[pts];
graph = ParametricPlot3D[f[u, v], {u, 0, 1}, {v, 0, 1}, Mesh -> None];
data = FirstCase[graph, _GraphicsComplex];
polygons = Cases[data, _Polygon, Infinity];
Graphics3D[
GraphicsComplex[(*3D points*)data[[1]],(*Polygon[]*)polygons,
data[[3]](*VertexNormals*)]]
@ShutaoTang Why not add EdgeForm[]?
@J.M. I tried the primitive style EdgeForm[Blue], which given me the following result:
@J.M. Please see this comment
03:54
@ShutaoTang You might consider combining ideas from Simon's answer there and my answer here.
 
5 hours later…
08:43
@ShutaoTang You can do it like this:
Graphics3D[{EdgeForm[None],
  GraphicsComplex[(*3D points*)data[[1]],(*Polygon[]*)polygons,
   data[[3]](*VertexNormals*)]}]
@J.M. @ShutaoTang Ups.. JM already gave you the answer.
09:02
@halirutan Your method is very like built-in. Thanks:). In addtion, I have tested J.M. 's method just now, I think it is a little time-consuming.
New Mathematica 11 functions and their documentation seem accessible through reference.wolfram.com/language/guide/…
8
@halirutan According to my experience, the sampling strategy ParametricPlot3D[] and BSplineSurface[] is different.
09:46
@Szabolcs Hi, I was just playing with mathematica.stackexchange.com/q/122011/5478 and this crashes the Kernel:
f[a_, b_, c_] := {a -> Subscript[v, a], b -> Subscript[v, a],
  c <-> Subscript[v, a]}
g = Graph[Join @@ {f[1, 2, a], f[3, 4, a]}, VertexLabels -> "Name"]
VertexDelete[
 g,
 Pick[VertexList[g], VertexDegree[g], 2]
 ]
Is that a known issue?
10:00
ImageMesh[], the 3D printing stuff, the channels and machine learning stuff... all interesting.
...and apparently it can finally handle integral equations!
So, Mathematica knows about yoga positions now, for some reason...
10:22
...who cares about yoga poses...pokemon data is still riddled with holes ... :D
10:34
Any tip how to create/fill/generate a Stylesheet's template? So one could put slots in options values etc?
The best would be to use just a plain text format but then the slot indication is done by a backtick, which is quite common in those files anyway. Making this approach a dead end.
`slotName` is really problematic in WL word :/
@Sascha Clearly they were not prepared for Go. :)
When Pokemon Go launched I imagined SW calling developers in the middle of the night to work on improving pokemon data asap...seems that only happened in my fantasy
10:51
@Kuba Sorry, I don't know. I don't remember seeing it. Please do report it!
I didn't see your message before.
I'm going to log out for a while to try to reduce the time spent here and be more productive elsewhere ... 100,000 is nice and it seems I'll get some swag from SE, but it somehow makes me feel like I really spent too much time on SE. I'm available by email as always.
@Szabolcs Good for you!
11:30
The Entity-related stuff seems to take on some form. Especially EntityStore looks potentially useful
11:59
And TextRecognize now handles Swedish, and callout labels... this is a great update!
 
1 hour later…
13:21
@Szabolcs Speaking of a new kind of pace:
> Hello Hali Rutan,

> In **Dec 2014** you reported an issue with Mathematica wherein repeatedly clicking links in the documentation crashes the Linux frontend .
> We believe that the issue has been resolved in the current release of Mathematica.
> Thank you for your report and we look forward to a continued, productive relationship with you.

> Best regards,
> .....
> Wolfram Technology Group
 
1 hour later…
14:32
@Sascha any data holes in pokemon are likely holes in the data source, but if you see anything glaring, let me know.
 
1 hour later…
15:42
A quickie: What should be the second argument of ImportString[] in the following so that the result is a list? ImportString["{\"a\",\"b\"}", format]
15:59
@J.M. ImportString["{\"a\",\"b\"}", "NB"] seems to work, even though it's not a notebook expression.
@J.M. ImportString["{\"a\",\"b\"}", "Package"]
ninja'd
@chuy That was the next thing I was going to try.
Thanks, @chuy and @Michael! I've been futzing with "Table" and "List" and couldn't quite make it work.
@J.M. Beware: it evaluates. Can use ImportString["{\"a\",\"b\"}", {"Package", "HeldExpressions"}]
good catch
16:05
@MichaelE2 well, they'll just become strings if they do evaluate in my case, but otherwise a nice reminder.
 
1 hour later…
17:10
I am trying to do Interpolation on this list: {{-1.11022*10^-16, 0}, {0.742987, 1}, {0.873441, 2}, {0.937679,
3}, {0.969312, 4}, {0.984888, 5}, {0.992559, 6}, {0.996336,
7}, {0.998196, 8}, {0.999111, 9}, {0.999562, 10}, {0.999785,
11}, {0.999894, 12}, {0.999948, 13}, {0.999974, 14}, {0.999987,
15}, {0.999994, 16}, {0.999997, 17}, {0.999998, 18}, {0.999999,
19}, {1., 20}, {1., 21}, {1., 22}, {1., 23}, {1., 24}, {1.,
25}, {1., 26}, {1., 27}, {1., 28}, {1., 29}, {1., 30}, {1.,
31}, {1., 32}, {1., 33}, {1., 34}, {1., 35}, {1., 36}, {1.,
however my interpolation doesn't give the correct result
Interpolation[tdata, InterpolationOrder -> 2, Method -> "Spline"]
I tried different InterpolationOrder and Method but it's not working...
18:08
@psimeson Well, if you like to have a interpolation function f(x) than this will not work, because you have many points with x=1.
What do you want to do with the interpolation function?
0
Q: How can I post an equation in textbook form?

HughI am trying to describe a differential equation I am putting into NDSolveValue. However, it is complicated and I would like to express it in textbook form before I show how I have put it into Mathematica form. I have tried copying from traditional form but this does not work. Any suggestions? Tr...

 
2 hours later…
19:48
@halirutan figured out the problem with it and solved it. Anyway Thanks @halirutan
20:21
reference.wolfram.com/language/ref/Callout.html How could this ("Add callouts to some of the countries that have relatively extreme areas or populations:" under "Applications") be done automatically?
20:32
MMA spits this error: Interpolation::inddp: The point 1. in dimension 1 is duplicated. >> ` while trying to do interpolation... the reason for this that there is a duplicates in the list.. I can use DeleteDuplicates to get rid of those if [{{x1,y1},{x2,y2}}] x1 =x2 and y1=y2 but is there a function in mathematica that at delete duplicates if only y1 = y2 or x1=x2
@psimeson DeleteDuplicatesBy[].
20:50
@J.M. Thanks
 
1 hour later…
21:57
DeleteDuplicatesBy[] isn't helping .. I thought that it would get rid of all the duplicates so that the interpolation would work but I am still getting Interpolation::inddp: The point 0.999999999999999 in dimension 1 is duplicated. >>`
22:12
@psimeson The real question is, is this really what you want.
Let me give you an example.
Let's take the function f[x_]:=Sqrt[1 - x^2] and as you can see, it is a half-circle
In the pure mathematical sense that f is a function f:R->R, it is not possible to make f into a full circle. Why? Because then every x value between -1 and 1 would have 2 y-values.
For your data it is kind of the same. You have several y-values that have the same x-value.
One solution to the circle problem is that you use a function that is not f: R->R. Instead think of a car/bike/train that moves on the circle lets in one second. So it starts at the time t=0 and then moves one round and in t=1 it returns to its original position in the circle. This is a function that gives you a 2d point for every timestep, g: R->R^2.
In our circle case, this function g is given by
g[t_] := {Cos[2 Pi t], Sin[2 Pi t]};
With your data you can do exactly the same. You create an interpolation function ip[t] that starts on your first point and moves smoothly over all your other points, interpolating the positions in between. Constructing such a function is easy because you basically do nothing more that interpolating x-values and y-values separately. You get two interpolating functions say ix[t] and iy[t] and then, your final function looks like ip[t_]:={ix[t],iy[t]}.
The Mathematica code is pretty easy for this. Let's assume your data is in the variable data. Then you can do:
With[{ipFuncs = ListInterpolation[#, {{0, 1}}] & /@ Transpose[data]},
 ip[t_] := Through[ipFuncs[t]]
 ]
That's it. You can check your function ip by combining it with a ListPlot of the data:
22:58
@halirutan that makes sense... I will try to implement to my code and see and how it goes... I wasn't happy with deleting the elements from the list but rather than thinking about the different approach I was trying to make my naive approach work.. Now after you showed me this .. I remember using similar approach last summer to a different problem ... Thanks!
@psimeson No problem, good luck.
@halirutan I need to use ip[t_] to get a number but it spits out two numbers... t is supposed to be between 0 and 1
@psimeson The question is, what would you like to do with the interpolation function?
@halirutan Let me try to describe in the way I was trying to implement before... this how I was trying to do it.. g = Interpolation[Table[{c[t, 10], t} /. {E0 -> 8.3, E1 -> 17, d -> 0.787, r0 -> 2.6, H -> 18.37}, {t, 0.001, 100}]]; .... this would give me a function g[u]...and u is uniformly distributed between 0 and 1 .. when I plug in u in g[u], I would get back number that would be t ...I am trying to implement inverse sampling
23:31
@psimeson So the data you presented is from the Table call?
Table[{c[t, 10], t} /. {E0 -> 8.3, E1 -> 17, d -> 0.787, r0 -> 2.6, H -> 18.37}, {t, 0.001, 100}]
wait, let me read the rest.
@psimeson Let's say you plug in the number u=1, which time t would you expect? :)
@halirutan I think I would never get u= 1 but close to 1.. so that case it would be around 10
@psimeson But do you see the problem in your data? If you really want a value for u=1, not even you as human can decide which one you should take.
@psimeson But if I understand you correctly, isn't the correct approach to just delete all trailing data-points that have the form {1., _}?
Like this
data = {{-1.11022*10^-16, 0}, {0.742987, 1}, {0.873441, 2}, {0.937679,
     3}, {0.969312, 4}, {0.984888, 5}, {0.992559, 6}, {0.996336,
    7}, {0.998196, 8}, {0.999111, 9}, {0.999562, 10}, {0.999785,
    11}, {0.999894, 12}, {0.999948, 13}, {0.999974, 14}, {0.999987,
    15}, {0.999994, 16}, {0.999997, 17}, {0.999998, 18}, {0.999999,
    19}, {1., 20}};

g = Interpolation[data]
that's what I was trying to do too
even with that I was getting problem with the Duplicates
23:44
@psimeson The problem seems to be that your data-points lie really close together.
which your way for interpolation solved but it introduced another problem
23:55
here's a better set of data for the same case: {{0, 0}, {0.00105356, 1.25893*10^-8}, {0.00132598,
1.58489*10^-8}, {0.00166871, 1.99526*10^-8}, {0.00209983,
2.51189*10^-8}, {0.00264202, 3.16228*10^-8}, {0.00332373,
3.98107*10^-8}, {0.00418055, 5.01187*10^-8}, {0.00525703,
6.30957*10^-8}, {0.00660877, 7.94328*10^-8}, {0.008305,
1.*10^-7}, {0.0104318, 1.25893*10^-7}, {0.0130955,
1.58489*10^-7}, {0.0164274, 1.99526*10^-7}, {0.0205881,
2.51189*10^-7}, {0.0257728, 3.16228*10^-7}, {0.0322165,
3.98107*10^-7}, {0.0401982, 5.01187*10^-7}, {0.0500438,
@halirutan This data doesn't have problem... since I am going to do a monte carlo simulation, I will have data for many different cases. for which I don't know the correct cutoff so that I won't introduce any Duplicates .. Your interpolation method would be prefect for all the cases

« first day (1659 days earlier)      last day (3123 days later) »