Questions tagged [streams]
A source of input or output: files and pipes are both examples of general Mathematica objects known as streams.
110 questions
2
votes
1
answer
188
views
How can I import only part of a huge .mx file (e.g., first 1000 elements)?
I have a huge data.mx file (~5GB). Importing it is really slow — is there a way to import just part of it?
The file contains a large list, and for example, I want ...
2
votes
0
answers
89
views
How to know current line number of a stream?
There is StreamPosition gives the position counting from the beginning of the file in bytes. But is it possible know current line number in a stream efficiently for ...
2
votes
2
answers
296
views
Perfect сubes duos in a line
We have a set of integers: 1,2,3,.....304,305
I like to rearrange them in a fashion such that the sum of every adjacent two is a perfect cube.
For example if we lineup 1,7 together (1+7=8 -- Perfect ...
15
votes
2
answers
2k
views
Stream reading 1000 times faster in Python
I have a 26GB CSV. I want to extract all the rows that have data for a specific sensor. In Mathematica I write:
...
1
vote
0
answers
219
views
RG flow trajctory plot using StreamPlot
I have three flow (beta-function) equations:
$\frac{dA}{dl}=-(B^2+C^2)$,
$\frac{dB}{dl}=(2-4A)B$,
$\frac{dC}{dl}=(2-A)C$,
where $A=\pi/(2\arccos(-(x+y)/2)$, $B=(x+y)/2$ and $C=(x-y)/2$.
I can make a ...
0
votes
0
answers
127
views
Delete last line in an open OutputStream
I have Mathematica code that creates a file (more precisely, I use OpenWrite and create an OutputStream object) and I use ...
1
vote
2
answers
168
views
ColorFunction for StreamPlot
I would like to color all lines witch have a positive vertical component in red and the other in blue. How can I do that?
...
0
votes
1
answer
71
views
Using Get with a few symbols to continue work in a later session [duplicate]
I have a notebook where I calculate integrals that take a long time to evaluate.
Let's say that I assign each evaluation to a symbol:
...
3
votes
0
answers
242
views
OpenRead with Method->"GZIP"
Aim
I'm trying to "Low level" read data from a large "GZIP" file as an InputStream.
Previous answeers
I ...
3
votes
1
answer
199
views
Plotting phase plane in Filippov systems
I wanted to plot vector fields and nullclines for Modified Rosenzweig-MacArthur Model.
and I have a problem plotting p1 and p2 in the same graph on top of each other(I want the vector fields arrows in ...
1
vote
0
answers
217
views
How to extend length of the streams in this StreamPlot
Is it possible the force the streams in StreamPlot[] to extend the full range of the graphic given specific points of my choosing? For example, notice the streams for the following code are short. I ...
1
vote
1
answer
165
views
Wolframscript: Removing prepended message from Print in slave kernel
I am running a parallelized algorithm using WolframScript and inside the function being passed to the various kernels, I have print statements that track the computation and output the print ...
0
votes
0
answers
158
views
How to plot field line with exact starting and ending position continuously
As the title suggested, I want to plot the electric field lines with exact starting and ending position continuously.
The code is like this:
...
0
votes
2
answers
177
views
Memory preserving computation in chunks
I would like to do the following:
Make a table
tab1={{i1,b1,c1,d1},{i1,b1,c1,d2},...,{i1,b1,c2,d1},...,{i1,b2,c1,d1},...{i2,b1,c1,d1},...}
for the given range imin < i < imax.
Make some ...
2
votes
1
answer
88
views
How to read doubles from specific location of a large file
I have a 1GB file in a proprietary format that is a mix of ASCII characters and doubles (floating point numbers). I need to read in a sequence of twelve doubles. They are in consecutive bytes of the ...