0
votes
2answers
79 views

Getting value of clock [duplicate]

I have the following code: a = Dynamic[Floor[Clock[2]]] (*So this basically alternates between 0 and 1*) If[a==1, Print["true"]] But this doesn't work, it ...
3
votes
3answers
126 views

How to create a button that colors a selected piece of text in a cell?

I use Mathematica 9.0.1 and I want change the color of a selection in a text cell using a button. But when I use this code it changes the color of the entire cell. ...
4
votes
2answers
167 views

Background color of Code cell lost when convert a notebook file to pdf

Well, I have a notebook with the built-in stylesheet Preprint, which I'd like to convert it to pdf. Everything works well except for the code cells(I use the shortcut key alt+8 to create cells of code ...
4
votes
5answers
828 views

Removing zero values from ordered pairs

I have some processed data, which are basically a collection of ordered pairs in the form: {{x1, y1}, {x2, y2}, ..., {xn, yn}} Ordered pairs which have either a ...
1
vote
3answers
126 views

problem with Importing multiple files

I need to import about 100000 "dat" files to my progrom. I want to do this using the last answer to this question: Importing multiple files using a for-loop I know that I should define a list of all ...
-1
votes
1answer
188 views

Integral evaluation taking too long [closed]

When I try to evaluate the following integral, it runs for a much longer time than I think is should without producing a result. What might be the problem? Can anybody please point it out? ...
-1
votes
1answer
357 views

How can I draw a Cuboid given its center and its dimensions? [duplicate]

I want to draw a Cuboid accroding to the coordinates of its geometric center and its dimensions, rather than its diagnoal coordiantes. And How can I draw a triangular prism?
9
votes
1answer
243 views

Efficiently filling area with disks located at certain points

Starting from a set of points, I want to fill an area using disks. Each disk's center should be one of the points and the disks should not overlap. I've managed to write a function that, given a list ...
3
votes
2answers
171 views

How to migrate or export projects with Workbench

Imagine the following scenario: user A is developing a project with documentation in workbench. She wants to give her (unfinished) work to user B , so that user B can continue work on the project and ...
0
votes
2answers
170 views

Reduce on equations involving integrals

Here's part of problem from a college physics text: A time-dependent force F = (8.00 i - 4.00 t j) N (where t is in seconds) is applied to a 2.00-kg object initially at rest. (a) At what time ...
3
votes
3answers
345 views

Defining a new Function using RegionPlot

I'm trying to make images like this: to illustrate 2D integrals to a calculus class. I used the code ...
2
votes
2answers
605 views

Using ChemicalData to make molecule graphics

I would like to take the acetone $((CH_3)_2CO)$ and chloroform $(HCl_3)$ molecules that Mathematica's chemical data provides, and plot them together. I want to show how chloroform can hydrogen bond ...
0
votes
2answers
682 views

Sequence of data in 3D, joining the points

Let me just first say I am not actually trying to find a function for these set of data. All I am doing is joining the points to make a line. Basically let's say I have some data, which I cleverly ...
0
votes
0answers
35 views

Symbolic Calculations with formal matrices [duplicate]

I want to make calculations with matrices in the form (for lovers of statistical mechanics, is just the first step replica symmetry breaking) ...
1
vote
0answers
135 views

Manipulate - Flickering graphics

I am new to mathematica and was experimenting with NDSolve and doing a simple demonstration of orbital motion and Newtons laws. I put together the following code which all seems to work except the ...
0
votes
2answers
129 views

Iterating Reads From a Text File and Writing the Results of Operation

I have a very large text (TSV) file. I am able to now read single line, thanks to StackExchange. I am able to read a part of that line using the part operator. I want to iterate through the whole ...
3
votes
2answers
531 views

NDSolve: Normalizing at every step

Suppose I have an transport equation with an initial conditions: ...
5
votes
1answer
126 views

Functions, Options and Symbols

In the normal Mathematica language, where no built-in symbols are redefined and no evil things happen, is it a valid assumptions, that no function symbol (Plot, ...
9
votes
3answers
312 views

Replace operators

/. can be used to replace variables but how can one replace operators. For example in a * b, ...
4
votes
1answer
262 views

Looking for a package regarding Schur Polynomials and Kostka numbers

I'm currently looking for any Mathematica package that involves Schur polynomials and/or Kostka numbers. More generally, I'd be happy with anything that expands on symmetric polynomials in general. ...
0
votes
0answers
28 views

What is the precision of this number? [duplicate]

In a matrix evaluation, I got the following number. 2.8330574963868513` I understand that the number after ` shows the precision of the output number. But this ...
2
votes
2answers
296 views

BC for transport equation using NDSolve

First I can solve a transport equation with a source (Is it still called transport equation?) using DSolve. The form of the source serves only as an example. It can ...
4
votes
1answer
150 views

Automatically tracing and keeping ViewPoints in a list while manually rotating 3D graphics

I will need to make a video from the manual rotation of a 3D graphics. In order to do this, I will need to record the set of all view points that I made during rotation. There is method that we can ...
5
votes
4answers
559 views

Left-aligned PlotLabel?

Is it possible to have the text generated by PlotLabel (or any other function) aligned to the left side of the plot instead of in the center?
4
votes
0answers
399 views

Kalman filter by hand

I am now learning the Kalman filter and wants to implement it by hand to understand it better. To be specific I want to first simulate a sequence of data by $$ \dot x=Ax+Bw\\ y=Cx+Dv,\\ ...
14
votes
6answers
584 views

Matrix Rotation

If I have a matrix of any size, say $\begin{pmatrix} 72 & 32 & 64 \\ 18 & 8 & 16 \\ 63 & 28 & 56 \\ \end{pmatrix}$ $\begin{pmatrix} 72 & 32 \\ 18 & 8 \\ 63 ...
2
votes
0answers
258 views

differential equations with implicit functions

I have an ordinary differential equation that contains coefficient functions that depend implicitly on the independent variable via an algebraic equation. I am trying to go ahead and use NSolve to ...
2
votes
0answers
196 views

Negative power instead of fraction

Solve returns a solution in the form {{x->y/a^2 + y^2/a^7}}. Since I want to process the input (with another program) in terms of Laurent polynomials, I would ...
1
vote
1answer
89 views

Factorize and find the null space of a polynomial in several variables [duplicate]

I've been asked to factor the following polynomial: poly = 6 x^3 + x^2 y - 11 xy^2 - 6 y^3 - 5 x^2 z + 11 xyz + 11 y^2 z - 2 xz^2 - 6 yz^2 + z^3 And to solve for z so that poly = 0 Can anyone help ...
0
votes
0answers
184 views

FindMaxValue vs FindMaximum

I'm studyng the maximum value of the following function ...
-3
votes
1answer
153 views

Limit of a subsequence

I am trying to calculate limit for a subsequence <${ a }_{ {n }^{ 2} }$> because I was trying to see that limits of sequences and subsequences are both same. I was able to generate the sum for ...
2
votes
2answers
1k views

Defining a non-commutative operator algebra in Mathematica

I am trying to develop a function(s) to do some commutator algebra to compute the enveloping algebra and ideals of a Lie algebra. For example if I have $SU(2)$ algebra generated by $L_i$ ($i=1,2,3$), ...
4
votes
2answers
146 views

Speed up plot of $\sum_{j\ge1} 2^{-j}(1-2^{-j})^{n-1}$

I'm a beginner at Mathematica. I would like to plot the following function: $${n\over2} \sum_{j\ge1} 2^{-j}(1-2^{-j})^{n-1}$$ However the following code is just too slow: ...
9
votes
2answers
251 views

Determining whether two $k$-chromatic graphs are isomorphic (respecting vertex coloration)

Consider the case where I have two $k$-chromatic graphs $G_1$ and $G_2$, i.e. two graphs where individual vertices can be colored with one of a set of $k$ total colors, and I would like to determine ...
18
votes
1answer
196 views

What's the internal command for entering a fraction?

I'm looking for the FrontEnd`Foo[...]-like command that's triggered when pressing Ctrl + /. Are there any discoverability ...
1
vote
3answers
284 views

Find a single max value

...
4
votes
3answers
436 views

How to create a planar graph from a set of random points

Question Given a set of points in the plane, how can you create a planar graph in the standard graph representation of Mathematica (version 9 or higher), from these points? Background A planar ...
3
votes
2answers
301 views

How do I represent a system dynamics feedback loop?

In System Dynamics, if I want represent the relationship between Speed and Distances, I create a Flow (Speed) and a Stock (Distance) as you can see in this Insight Maker Sample . Heres an Image of how ...
1
vote
2answers
93 views

Interpolation of an upper-triangular list

I have 2d list which is upper triangular. I would like to interpolate it, but I cannot unless I set the interpolation order to 1. I tried making the list rectangular by filling the bottom half with ...
2
votes
2answers
140 views

How to find out if invisible notebooks are still open

If I create a notebook CreateDocument and I set options such that Visible -> False, is there any way to tell if it's still ...
2
votes
1answer
122 views

Round image corners [duplicate]

I just read StackExchange blog It’s OK to Ask and Answer Your Own Questions which even encourages it and decided to ask about a problem I now know how to solve. But I found an elegant answer only ...
4
votes
1answer
349 views

How to export attributes or annotations to an HDF5 file?

I'm trying to export attributes and annotations to an HDF5 file. But the documentation here is horrible and there are no examples of this. I spent some time playing, but I can't get it to work. Here ...
2
votes
3answers
188 views

Speeding up a simple simulation with random extractions

I wonder if anybody can help, I need a hand with a simple simulation I am writing with Mathematica (I am using version 8). Basically it creates a list (called l) with numbers from 1 to n and a random ...
0
votes
3answers
214 views

Cover a rectangle with size constrained rectangular regions

I have a big grid (indicated on the image in grey) that is divided in several blocks (each with a maximum width of 3 units). Now I would like to divide a region (indicated on the grid in red) by the ...
11
votes
2answers
266 views

Transform fancy usage messages in 1D string

When we look at the usage messages of built-in functions nowadays (not in the good old times, when they were a simple descriptions) we see that although they look pretty in the front end, it is really ...
0
votes
1answer
233 views

ContourPlot with parameter

I have an equation for function F[x,y]==0 which first argument x is real and another, y, ...
2
votes
2answers
456 views

Using transfer function model to generate state space model

I am trying to generate the state space model for the following system: However, the following code does not generate the state space model I expect: ...
1
vote
1answer
84 views

Plotting data that lands on the axis

I have a data point that lands right on the Y axis, which corresponds to the index of refraction of some sample. the x axis is the mole fraction of chloroform of my samples. How do I get the first ...
2
votes
2answers
305 views

Aligning Text Using Spaces While Maintaining Pretty Print

To help illustrate my problem, consider the following cell: First thing to notice is that there is syntax highlighting. Second, I can pretty print mathematics; that is, I see $x^2$ instead of ...
4
votes
2answers
236 views

Can Mathematica understand Excel dates when in number format?

I have a very large Excel file with dates in the format 2013/01/17 08:02:00 PM which is a custom date format. I have to convert this file to CSV in order to import it into Mathematica because I can't ...

15 30 50 per page