Tag Info

New answers tagged

1

Creating a Table won't help you. You need to create an array (list) for your individual variables like eVars = Array[e,n] where n is some fixed integer. Then you need to create an appropriate objective function, that mixes all the components together in the way you want them to interact and yield a real value, not some kind of vector. From a ...


2

change the value of the four arguments to calculate more.If you don't want so many output use semicolon at the end of each assignment.


2

Here's a minimally-changed working version of what you want, I think: Do[ Do[ If[ (Subscript[B, i][[j]] == {20} && Subscript[B, i][[j + 1]] == {10}) || (Subscript[B, i][[j]] == {10} && Subscript[B, i][[j + 1]] == {20}) , Subscript[new, i] = Module[ {a = Subscript[B, i]} , ReplacePart[a, {j -> a[[j + ...


6

Getting the form desired by the OP was a challenge, but here goes: vectorPermutations[n_] := Module[{ss, tt, mt}, ss = Table[Subscript[A, i], {i, 1, 2^n}]; tt = Tuples[{0, 1}, n]; mt = MapThread[f, {ss, tt}, 1]; HoldForm[Evaluate[mt]] /. f -> Set] vectorPermutations[4] Edit: To turn the displayed permutations into assignments, use ...


3

Building off the comments above: set $n$ to whatever value you want, and then run the following code: Evaluate[Table[Subscript[A,i], {i, 2^n}]] = Tuples[{0, 1}, n] The Evaluate appears to be necessary so that Mathematica knows that you want to equate the results of the Table command with the RHS, rather than trying to redefine the Table command itself.


1

This should give some ideas. I add a safety valve in case the rank is always 5. indx = 0; det = 1; While[det != 0 && indx < 100, indx++; l = RandomSample[ovld, 5]; det = Det[l];] {indx, l} (* Out[163]= {3, {{5, 4, 3, 2, 1}, {4, 3, 2, 1, 5}, {2, 1, 5, 4, 3}, {1, 2, 3, 4, 5}, {2, 3, 4, 5, 1}}} *)


1

Since the default vector points are placed without any regard to the location of the singularities, you can get very large relative differences in the norm of the field vectors. Since the default vector arrows are rescaled relative to the 3D box and not to the absolute scale of the field vectors, you have to do any clipping or damping of the relative norm ...


2

Apparently, the problem is with LineIntegralConvolutionPlot generating a Graphics object with Raster[{{{rgb},{rgb},{rgb}...}},...] irrespective of the underlying image or the color specifications or whatever. My solution is to modify the resulting graphics object. First let's generate some fake data: cp = ContourPlot[ 1/Sqrt[y^2 + (x - 2)^2] - 1/Sqrt[y^2 ...



Top 50 recent answers are included