Tag Info

New answers tagged

1

Would something like this work for you? generatematrix := Module[ {rows, columns, function, result}, rows = Input["Enter the number of rows"]; columns = Input["Enter the number of column"]; function = Input["Enter the function"]; result = Array[function, {rows, columns}]; MatrixForm@ result ] Every time you evaluate generatematrix, ...


0

I have been unsuccessful troubleshooting my code above. As is typical, I've had to step back and approach the problem from a different angle. As such, the code here does accomplish my goal of creating a file chooser that allows a user to select files into one of two categories, while existing inside a DynamicModule. Hopefully this approach may help others ...


0

Let's create nested With with knowledge about RawBoxes. I'd not use this method in this case, due to the performance but it is a good exercise: SetAttributes[myWith, HoldAll]; myWith[{spec___}, body_] := ToExpression @@ Fold[ RawBoxes @ MakeBoxes[With[{#2}, #]] &, RawBoxes @ MakeBoxes @ body, RawBoxes /@ MakeBoxes /@ Unevaluated[{spec}] // ...


6

The two examples you mention are easily understood from the way Dynamic updating works. Let us concentrate on Dynamic[x]. It is sent by the frontend to the kernel and the kernel returns it unevaluated to the frontend, together with the boxes in which the frontend will display. Then the front starts an update procedure over the preemptive link, asking the ...


2

I don't know what the popup menu is for -- but I've left that bit of code in there -- but this should be what you need: DynamicModule[{files, pop, images = ""}, Column[{ Row[{"Select which kind of profile you want", PopupMenu[Dynamic@pop, {1, 2}]}, Spacer[3]], Button["Image import, choose your image here", files = ...



Top 50 recent answers are included