0
|
3216 Views
|
2 Replies
|
0 Total Likes
View groups...
Share

# An automatic way to input x, xmin, xmax for a RegionPlot?

Posted 10 years ago
 Hello,I have currently a kind of function that returns dimensions for a set of data, of this sort:In:= CF[cf]({#[],-2*Abs[#[]],2*Abs[#[]]})&/@Rest[CF[cf]]Out= {a00->-10,a02->1,a10->-1}Out= {{a02,-2,2},{a10,-2,2}}So, a00 and so on are my dimensions on which I am plotting. However, if I use the return value as input for the second and third argument of my plot, I get an error as (I guess) a02 and a10 are protected (I guess Mathematica use them as variable during the processing).Is there a way for me to use this output? Currently I have to copy/paste Out manually, and when trying to automatize the vizualisation of several dataset if become tedious...Thanks, please let me know of any inaccuracies, I am still learning to use Mathematica.
2 Replies
Sort By:
Posted 10 years ago
 Thanks, that is indeed exactly what I needed.
Posted 10 years ago
 It is a little hard to make out what you are doing from the code fragment. But if you are able to assign Out83 to a variable, and you want to use it as the two lists required by a plotting routine, then the problem is that the plotting routine wants two arguments, and this is a single list containing two lists. This can be remedied by replacing the Head (the first level of the list) with Sequence, which can be done by Applying Sequence to it, the short form being @@.For example:range = {{x, 0, 3}, {y, -5, 5}};Plot3D[Sin[x] Sin[y], Sequence @@ range // Evaluate] You will note that the syntax checking in the Front End still suggests more input. But once the Sequence@@ is evaluated, Plot3D has the two lists it wants for range specifications.Best,David