儿歌一首

我家有只小倭瓜,白天黑夜吹喇叭;

喇叭一响人心慌,忙沏奶粉浇灌他。

倭瓜倭瓜快长大,长成一个胖娃娃;

藤蔓葳蕤万人迷,再结满藤小倭瓜。

自适应差分演化matlab,C++

http://irafm.osu.cz/sago/differential_evolution.html

可以手动调整AxesLabel的位置

代码

pt0 = Scaled[{0.5, 0.15}];
pt1 = Scaled[{0.75, 0.35}]; 
pt2 = Scaled[{0.15, 0.55}];

{w, h} = {400, 250};(*width& height*)
{{l, r1}, {b, t}} = {{80, 40}, {60, 10}};(*padding controls*)

p[r_, coupon_, n_, value_] := (coupon*value)/r (1 - 1/(1 + r)^n) +value/(1 + r)^n

plot = Plot3D[
   Evaluate[
    p[r/100, c, n, 1]^-1*D[p[r/100, c, n, 1], r] /. r -> 6], {n, 1, 20}, {c, 0, 0.1}, ImageSize -> {w + l + r1, h + b + t}, 
   ImagePadding -> {{l, r1}, {b, t}}];

labelx = Style["x", FontFamily -> "Arial", Bold, 12];
labely = Style["y", FontFamily -> "Arial", Bold, 12];
labelz = Style[Rotate["z", 90 Degree], 
   FontFamily -> "Arial", Bold, 12];

fig = Overlay[{plot, 
   Graphics[{}, AspectRatio -> (h + b + t)/(w + l + r1), 
    ImageSize -> {w + l + r1, h + b + t}, ImagePadding -> 0,     Epilog -> {Dynamic[Locator[Dynamic[pt0], labelx]], 
      Dynamic[Locator[Dynamic[pt1], labelz]], 
      Dynamic[Locator[Dynamic[pt2], labely]]}]}, All, 2]

你可能感兴趣的:(严肃文学)