Tag Info

New answers tagged

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}] (* ...


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 ...


0

I figured out the issue; my initial conditions were set wrong. A = {{-b11 x, -b12 x, -u x}, {- b21 y, -b22 y, -u y}, {v z, v z, 0}}; charA = CharacteristicPolynomial[A, \[Lambda]]*-1; coeList = CoefficientList[charA, \[Lambda]]; a0 = coeList[[4]]; a1 = coeList[[3]] /. x -> xbar /. y -> ybar /. z -> zbar; a2 = coeList[[2]] /. x -> xbar /. y ...


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 ...



Top 50 recent answers are included