User Portlet
Discussions |
---|
I just post this (somewhat ugly) code as just an illustration of customizability (in short time). There are nicer ways and there are issues of overlaps , above/below etc. [mcode] fun[f_, x_, a_List, x0_, x1_, c_, yp_, al_, off_, opts :... |
Bruce Miller, I was uncertain regarding the nature of the question, hence my post. I merely wished to illustrate how to pass things to legend and how to customize. |
I agree with Gregory Fridman, the behaviour with a list is not consistent with NextPrime[n,#]&/@list. To be specific:NextPrime[5, {-1, 2, 1, 0}]yields: {3, 11, 7, 5} However: NextPrime[5, {-1, 2, 1}]yields: {3,7,5}... |
In Mathematica 9 you can program your problem using LinearProgramming. |
Just another way (with no advantage) you can solve the system for the desired function: [mcode]r := 0.1; c := 1/r; c1 := 0.01; a := 1; b := 0; sol = Y[z] - Z[z] /.First@NDSolve[ {{ Z''[z] + r*(-c1*Sin[z]*Exp[-z/r] + c)*Z[z] == 0, Z[b] == 0,... |
David, I too wait for WRI to deal with this issue. The diverse number of tools in Mathematica allows you to play/experiment and achieve your aim. I think there has been a significant progressive improvement in legend capabilities and the range of... |
Thank you for this post and linking to you blog,esp mosaic plots with data summaries and quantile regression. Look forward to exploring these. |
Just an alternative:m[l_] := Range[-l, l]You can produce list: res = Join @@ Function[x, {x, #} & /@ m[x]] /@ Range[0, 2] This yields: [mcode]{{0, 0}, {1, -1}, {1, 0}, {1, 1}, {2, -2}, {2, -1}, {2, 0}, {2, 1}, {2,... |
Just for fun: the 900 numbers can be partitioned by the parity of the integer digits. Of the 8 (2x2x2) patterns the 4 which start with an odd number: they ae of size 125 (5 x5 x5) and the 4 starting with even number are of size 100 (4x5x5): 900=4... |
Here is an attempt to generalize and perhaps serve as motivation for others, [mcode]qna[q_, a_, alt_] := DynamicModule[ {ln, funs, var, enb, layout, cusum, vis = "", perc}, ln = Length[q]; enb = Table[Unique["e"], {ln}]; Map[(#[_] :=... |