Tag Info

New answers tagged

5

I do this all the time, but use small buttons next to the slider. This is handy when one wants to jump to specific value, and sometimes it is hard to get the slider to go there exactly without few hits and misses and one ends up opening the slider using "+" and typing in the value in the small window which is not very efficient sometimes. Here is an example ...


1

There are two issues here. The first one can be explained easily because you simply forgot that your button needs to do something. Just evaluating your Manipulate is not going to do what you like, because you need to see it on screen when you want to interact with it. Therefore, you need to Print or CellPrint your Manipulate. The second issue arises when ...


6

One difficulty in using Manipulate is that it rewrites your code for you in ways that are not clearly explained in the documentation. The thinking is that this rewriting achieves the dynamic interactions described in the documentation without burdening the programmer with some of the tedious details involved. For instance, expressions that contain ...


4

You need to do some initialization. Manipulate often behaves strangely when its controls are not initialized properly. f[u_] := If[u <= 1, 5, 0]; Manipulate[ Column[{ Row[{"x: ", x, " f[x]: ", f[x]}], Row[{"ang: ", ang, " f[ang]: ", f[ang]}]}], {x, 0, 2}, {{ang, x}, x, 2}] (* initialization added to control *)


1

EvaluationNotebook gives the palette Notebook itself; try using InputNotebook instead: CreatePalette[{TextCell["\n1. Choose any file for analysis?", Bold, Blue, 16], Row[{FileNameSetter[Dynamic[cdflocation]], Spacer[20], Dynamic[cdflocation]}], Button["Go!", If[Head[cdflocation] === Symbol, Print["not ready"], (Print["tag should update now"]; ...


0

To make more automatic approach we can use some knowledge shared by MichaelE2: Manipulate: How to create custom reset Button automatically? EKSWaveFormControl[] := Manipulate[ Plot[ctrlVdc + ctrlVac ctrlgFunc[2 \[Pi] ctrlf t + ctrlPhi], {t, 0, 0.4}], {{ctrlgFunc, Sin, ""}, {Sin, Cos, Tan, Cot}}, Delimiter, {{ctrlVac, 1.5, Subscript["V", ...


1

I don't know how to do what you ask, but here is an alternative approach that you might use. snapshots = {}; Manipulate[ Plot[ctrlVdc + ctrlVac ctrlgFunc[2 π ctrlf t + ctrlPhi], {t, 0, 0.4}], {{ctrlgFunc, Sin, ""}, {Sin, Cos, Tan, Cot}}, Delimiter, {{ctrlVac, 1.5, Subscript["V", "ac"]}, -10, 10}, {{ctrlVdc, 0.5, Subscript["V", "dc"]}, -1, 1}, ...



Top 50 recent answers are included