« first day (1408 days earlier)   

12:37 AM
Can someone confirm this on 10.3? What do you see when you evaluate
 {u, {x -> "X-Label", y -> "Y-Label"}}
This is the proper way to use a setter bar with labels, but for me, after evaluating I see f[x->"X-Label"]
@halirutan Same. Until I start clicking on the buttons. Then I just see f[x] or f[y].
@MichaelHale Yep. Exactly what I see.
Shit.. I need labels to cover the x expression
Manually specifying initial value works though.
Manipulate[f[u], {{u, x}, {x -> "X-Label", y -> "Y-Label"}}]
@MichaelHale yes, I know.
@MichaelHale I'm pretty sure I saw a similar issue once.
7 hours later…
7:17 AM
Q: Unexpected Setter Bar Behavior when Manipulate Nested in Dynamic Module

tjm167usConsider this code: DynamicModule[{x, y}, x[t_] := t^2 + 5; y[t_] := t^3 + 5; Manipulate[Plot[fcn[t], {t, -5, 5}], {fcn, {x -> "Square", y -> "Cubic"}}]] Why does the SetterBar created by Manipulate not highlight properly when either option is selected? The same problem exists for other us...

Q: Labeling SetterBar in Manipulate

user7265This is the form of my list list1 = {{1, 2}, {3, 4}}; list2 = {{5, 6}, {7, 8}}; list = {{list1, list2}}; I want to plot list1 and list2 in a ListPlot with Manipulate like this Manipulate[ListPlot[list[[1,count]],PlotRange->{{0,10},All}],{count,{1,2->"Label 2"}}] This works perfectly well. H...

@halirutan @halirutan
8:19 AM
Q: Are accepted answers of score 0 making a topic "answered"?

KubaSo I was going to search for unanswered questions with at least one answer which should be then of score 0 since the topic is unanswered. According to advanced search I thought it should work: closed:no isanswered:no answers:1 because: isanswered: yes/true/1 returns only questions that ha...

9:10 AM
@Karsten7. I've moved our conversation to main
Q: Why Base64 ends with a newline? (\n)

KubaWhy everything converted to Base64 has a newline at the end? It isn't one of base characters, is it? Style[ b64 = ExportString["some pig", "Base64"], ShowStringCharacters -> True ] "c29tZSBwaWc=\n" Moreover, it seems that it doesn't matter if you drop it or not: ImportString[#, "Base64"]

8 hours later…
5:18 PM
Hey guys, could someone please help me implement this answer below using `DensityHistogram`instead please? I keep getting an error: `Too many parameters in {x,y} to be filled from Function[{x,y},Blend[...][0.833333].`
5:47 PM
@Sosi it seems DensityHistogram Color Function can only take Heigth argument
but since t is not really about Density Histogram:
recA = .25
{colorFun @@ #, Rectangle[# - recA/2, # + recA/2]} & /@
    Union@Round[#, recA] &@pos // Graphics
(@Kuba, should I ask a question with this? You can then get some more points for an answer)
@Sosi I don't know, it seems to be to narrow, but maybe you can ask it in more general manner. I don't know :)
@Sosi is my code working for you?
recA is some kind of resolution parameter
it's giving some error
"blend is not a graphics primitive or directive"
@Sosi here's whole code:

n = 5000;
pos = RandomVariate[NormalDistribution[0, 2], {n, 2}];
altitude = Norm /@ pos;
colorFun =
  Function[{x, y},
   Blend[{{Min[altitude], Yellow}, {Max[altitude], Red}},
    Norm[{x, y}]]];

recA = .25
{colorFun @@ #, Rectangle[# - recA/2, # + recA/2]} & /@
    Union@Round[#, recA] &@pos // Graphics
ah this one works
5:53 PM
Ok, get to go, good luck
yeah, I think this would be cool for my purposes!
6:35 PM
Does anyone have tips for how I can approximate the period of a limit cycle as precisely as possible? Currently I'm choosing a spot in the vector field, integrating for a while so that I approach the orbit/limit cycle, and then use WhenEvent like this:
{{xpos, ypos}} = {x, y} /. NDSolve[{
     x'[t] == y[t],
     y'[t] == -1.5 (x[t]^2 - 1) y[t] - x[t],
     x[0] == 0.5,
     y[0] == 0
     }, {x, y}, {t, 0, 100}];

{{xpos, ypos}} = {x, y} /. NDSolve[{
    x'[t] == y[t],
    y'[t] == -1.5 (x[t]^2 - 1) y[t] - x[t],
    x[0] == xpos[100],
    y[0] == ypos[100],
     Norm[{x[t], y[t]} - {xpos[100], ypos[100]}] < 0.1,
    }, {x, y}, {t, 0, 100}]

(* The above integration stopped at 7.06; example visualization: *)
I don't like my Norm[{x[t], y[t]} - {xpos[100], ypos[100]}] < 0.1, the choice of 0.1 is not good enough and if I make it smaller then it won't work. I also tried ArcTan but I have precision problems with that as well.

« first day (1408 days earlier)