Tag Info

Hot answers tagged

4

exp = Reduce[#, Backsubstitution -> True] & /@ BooleanMinimize@ CylindricalDecomposition[x^2 + y^2 <= 1 && y <= x, {x, y}]; ToBoxes[TraditionalForm @ exp] /. "\[Or]" -> "\[Or]\n" // RawBoxes Or, wrap with TraditionalForm: ToBoxes[TraditionalForm@exp] /. "\[Or]" -> "\[Or]\n" // RawBoxes // TraditionalForm ...


4

Here is the simple method I use. I create a button (with label "[[?]]") that finds the position of the current selection in the last output. You can add the button to a custom utilities palette for easy access. Button["\[LeftDoubleBracket]?\[RightDoubleBracket]", Print@Position[%, ToExpression@CurrentValue@"SelectionData"]] Here's how to use it to grab ...


2

Here's one possible way of doing this. Type some text into 2 successive text cells, then select the cell brackets, open the option inspector (Format / Option Inspector ...) and alter the values displayed at Cell Options / Display Options / CellMargins. For instance, if the 2 text items are "Hello" and "World", then the resulting Cell expressions might be ...


1

You need to flatten the list and convert elements to numeric values: prob = Import["/home/Desktop/test1.txt", "Table"]// ToExpression// Flatten; Then you can find the Shannon Entropy (without a do loop and initialization): alpha = 1.1; t = Length[prob]; shannon = Sum[-prob[[i]]*Log[prob[[i]]], {i, 1, t}]; Print[{alpha, shannon}] (* ...



Only top voted, non community-wiki answers of a minimum length are eligible