English 中文(简体)
如何在制约因素下以图表方式界定参数值?
原标题:How to define parameter values graphically, under constraints?

I m试图说明是否可能实施以下数学接口。

我想在数学方面建立一个接口,使用户能够以图表和互动的方式界定任意数量的数字参数,但须受限制。

问题参数为:数字权重:<代码>[0,1]<>>/代码>,每个参数都与相应标准有关,并限于一个。 显然,这种限制导致对每一标准可能相关的重量进行权衡,我希望通过沿以下路线(不幸的是,在Excel)进行互动,以图示这种权衡:

“Example

例如,有6项标准,但我要概括地说,这些标准是任意的(例如,在2和7之间)。

接口将沿对应轴对多角vert(相当于特定重量)进行分解,使其他 the进行统一调整,以便总合1。

然后,数字数值将退还,用于随后的计算。

我仔细研究,似乎无法找到问题相同的人(查询的定义可能是非属人性的)。

在数学例子中,我发现的最近一点是,在座椅上安装了3个点,其位置是:

DynamicModule[{pt = {{1, 1}/2, {-1, 1}/2, {1, -1}/2}}, {LocatorPane[ Dynamic[pt], Graphics[{Gray, Disk[]}]], Dynamic[pt]}]

”/</a

最佳回答

可能的话

Manipulate[
 DynamicModule[{mags, pts, bkgrnd, corners},
  corners = N@Table[{Sin[2 Pi i/n], Cos[2 Pi i/n]}, {i, n}];
  mags = N@Table[1/n, {n}];
  pts = mags corners;
  bkgrnd = {{FaceForm[Opacity[0]], EdgeForm[Gray], 
     Polygon[ Table[r corners, {r, .2, 1, .2}]]},
    Table[
     Text[Row[{"Criterion ", i}], 
      1.05 corners[[i]], -corners[[i]]], {i, n}]};

  LocatorPane[
   Dynamic[
    pts, (mags = Norm /@ #; mags = mags/Total[mags]; 
      pts = mags corners) &],
   Dynamic@Graphics[{bkgrnd,
      {FaceForm[], EdgeForm[{Thick, Blue}], Polygon[pts]},
      Table[
       Text[NumberForm[mags[[i]], {4, 2}], 
        pts[[i]], -1.8 corners[[i]]], {i, n}]}, PlotRange -> All],
   Appearance -> Graphics[{PointSize[.02], Point[{0, 0}]}]]],

 {{n, 3}, Range[3, 7]}]

检查:

“即线”/

问题回答

也许像这样:

n = 6;
posText[x_List] := Text[Round[Norm@#/Total@(Norm /@ x), .01], 1.3 #, 
                        Background -> LightRed] & /@ x;
rot = RotationMatrix[Pi/15];
DynamicModule[{
  pt = pti = {Re@#, Im@#} &@(E^(2 I Pi #/n)) & /@ Range@n,
  r  = Array[1 &, n]},
 Column@{LocatorPane[
    Dynamic[pt],
    Framed@Graphics[
      {(*The Arrows*)
       Black, Arrow[{{0, 0}, 1.2 #}] & /@ pt,

       (*The Criteria Numbers*)
       MapIndexed[{Text[Style[#2[[1]],20], #1],Circle[#1,.1]}&, 1.1 rot.#&/@pti],

       (*The Cyan Polygons*)
       FaceForm[None], EdgeForm[Cyan], Polygon[pt #] & /@ Range[.2, 1, .2],

       (*The Points*)
       Black, Dynamic[Point[r = MapThread[#1 Clip[#1.#2, {0, 1}] &, {pti, pt}]]],

       (*The Text legends*)
       Dynamic[posText@ r],

       (*The Red Polygon*)
       EdgeForm[{Red, Thick}], Dynamic[Polygon@r]},

      ImageSize -> 550, PlotRange ->1.5 {{-1, 1}, {-1, 1}}], 
    Appearance -> None],
   (*The Footer*)
   Dynamic[Grid[{Table[Norm@r[[i]], {i, n}]}/Total@(Norm /@ r), Dividers->All]]}]

“entergraph

“entergraph





相关问题
Interactive architectural diagram tools [closed]

Are there any tools that would allow me to easily create an interactive architectural diagram? I envisage the ability to view a graphical depiction of the architecture at a high level. I would then ...

Interactive Design-Time User Control

I apologise if the title was confusing, it took me nearly 5 minutes to finally think of a title for this one... Okay, you know how in Visual Studio Express when you add a TabControl to the Form, and ...

Hosting .fsx scripts inside larger applications

I want to expose my F# libraries as a scriptable tool for data manipulation. Optimally, I want this scripting facility to not require a full F# install with fsi and so on. Is there a way to link ...

Interactive Python GUI

Python have been really bumpy for me, because the last time I created a GUI client, the client seems to hang when spawning a process, calling a shell script, and calling outside application. This ...

(Tcl/Expect) clear screen after exit

I want to clear the screen (on the local machine) after exiting from my (semi) interactive expect script. Can I do that from within the script? Here s what I tried, that failed. #!/usr/bin/expect -f ...

git rebase interactive: squash merge commits together

I wanted to have a simple solution to squash two merge commits together during an interactive rebase. My repository looks like: X --- Y --------- M1 -------- M2 (my-feature) / / ...

热门标签