我如何定位和定位调整 Mathematica 操作面板中的输出大小?
以下代码允许您使用惠斯通电桥中的值。输出显示在滑块的右侧。如何使输出面板 (expr) 出现在其他位置以及如何设置固定大小? (我只能找到用于操作控件大小和位置的选项,而不是 Manipulate 文档中的输出。)
Manipulate[
Evaluate[(10^Rx/(10^R3 + 10^Rx) - 10^R2/(10^R1 + 10^R2))*Vin] "V",
{{R1, 5}, 1, 6, 0.01},
Pane["R1 = " Dynamic[Round[10^R1] "\[CapitalOmega]"],
ImageMargins -> {{2.5, 0}, {3, 0}}], {{R2, 5}, 1, 6, 0.01},
Pane["R2 = " Dynamic[Round[10^R2] "\[CapitalOmega]"],
ImageMargins -> {{2.5, 0}, {3, 0}}], {{R3, 5}, 1, 6, 0.01},
Pane["R3 = " Dynamic[Round[10^R3] "\[CapitalOmega]"],
ImageMargins -> {{2.5, 0}, {3, 0}}],
{{Rx, 5}, 1, 6, 0.01},
Pane["Rx = " Dynamic[Round[10^Rx] "\[CapitalOmega]"],
ImageMargins -> {{2.5, 0}, {3, 0}}],
{{Vin, 2.5}, 0, VMax, Appearance -> "Open"}]
The following code allows you to play with the values in a Wheatstone Bridge. The output appears to the right of the sliders. How do I make the output panel (expr) appear somewhere else and how do I set a fixed size? (I can only find options for manipulating size and position of Controls, not the output in the Manipulate docs.)
Manipulate[
Evaluate[(10^Rx/(10^R3 + 10^Rx) - 10^R2/(10^R1 + 10^R2))*Vin] "V",
{{R1, 5}, 1, 6, 0.01},
Pane["R1 = " Dynamic[Round[10^R1] "\[CapitalOmega]"],
ImageMargins -> {{2.5, 0}, {3, 0}}], {{R2, 5}, 1, 6, 0.01},
Pane["R2 = " Dynamic[Round[10^R2] "\[CapitalOmega]"],
ImageMargins -> {{2.5, 0}, {3, 0}}], {{R3, 5}, 1, 6, 0.01},
Pane["R3 = " Dynamic[Round[10^R3] "\[CapitalOmega]"],
ImageMargins -> {{2.5, 0}, {3, 0}}],
{{Rx, 5}, 1, 6, 0.01},
Pane["Rx = " Dynamic[Round[10^Rx] "\[CapitalOmega]"],
ImageMargins -> {{2.5, 0}, {3, 0}}],
{{Vin, 2.5}, 0, VMax, Appearance -> "Open"}]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,如果您可以相对于内容框定位控件,那么您也可以相对于控件定位内容框,不是吗?
因此,
ControlPlacement
应该处理盒子的位置,并将其放入Pane
中负责调整其大小(使用ImageSize
,尽管似乎它从控件大小中获取最小大小)。编辑 将
[CapitalOmega]
更改为\[CapitalOmega]
。谢谢贝利撒留。新图片。谢谢向导。
Well, if you can position the controls with respect to the content box then you're positioning the content box wrt the controls as well, aren't you?
So,
ControlPlacement
should take care of the position of your box, and putting it in aPane
takes care of sizing it (withImageSize
, although it seems that it takes its minimum size from the control sizes).EDIT Changed
[CapitalOmega]
to\[CapitalOmega]
. Thanks Belisarius.New picture. Thanks Wizard.