All Questions

130 views

Consecutive Print to target same output Cell

Is it possible to conveniently direct the output of consecutive Print statements to the same output without actually accumulating the output in a temporary string/variable. This would be useful in ...
208 views

Lowering the degree of an polynomial with an assumption that the polynomial has a factor x^2+ax+b

Let's assume $x^{10}+x^5+1$ has a factor $x^2+ax+b$ Then, If $x^2=-ax-b$, $x^{10}+x^5+1 =0$. If we successively apply $x^2=-ax-b$ to $x^{10}+x^5+1$, we can make $x^{10}+x^5+1$ to degree 1, ...
518 views

Building graph based on the cities connection?

I built a Graph based on the permutations of city's connections from : ...
866 views

Mapping a pure function with multiple slots [duplicate]

Here is a pure function with multiple slots: (#1^2 + #2^2)&[3, 4] 25 But how can I map that pure function over lists of values? For example, say I want ...
603 views

Solution of equation with power series (perturbation)

So I need to use Mathematica to find the solution of $y=x- \epsilon \sin(2y)$ as a power series in terms of $\epsilon$. I'd assume I'd need to create an equation $f=x-y- \epsilon \sin(2y)$, then ...
408 views

How to open hyperlinks (from web-embedded CDF) in a new tab

I have a problem with Hyperlink (in a web-embedded CDF) opening links in the same browser tab and I couldn't find an option to avoid that. I have the following ...
440 views

How can I make private functions inside packages

I want to make private functions.for that purpose,I wrote the following code. BeginPackage["Test1"] Begin["Private`"] function1[x_]:=x End[] EndPackage[] I ...
6k views

Quick Hessian matrix and gradient calculation?

I am absolutely new to Mathematica and I actually want to try implementing a little optimization method . Long story short assuming I have a predefined two-variable function f(x,y) I want to ...
530 views

Simplistic Notation example

Notation package looks poorly documented. For example, GridBoxDividers option is not documented at all. Can someone give me a simplistic example of a Notation set ...
340 views

Handling holidays in financial time series

I have two lists: list1and list2, which are financial time series with only 2 variables—date and price. The problem is: these ...
573 views

Nested Map and Apply

There are some other questions on this topic but I could not get an answer from reading them. What I want to do is use Apply on some of the arguments of a function, ...
388 views

How do I constrain the region where I can drag a Locator?

How do I constrain the region where I can drag a Locator to conform to rules, including rules that apply to computations resulting from the value of the ...
426 views

Multi-column table layout the right way

How do I create book-like multi-column table formatting for a long, narrow tables in a preferably elegant way? Should I be thinking of stylesheets, instead of formatting? I guess this is a solved ...
568 views

What function can I use to evaluate $(x+y)^2$ to $x^2 + 2xy + y^2$?

What function can I use to evaluate $(x+y)^2$ to $x^2 + 2xy + y^2$? I want to evaluate It and I've tried to use the most obvious way: simply typing and evaluating $(x+y)^2$, But it gives me only ...
1k views

Save and call matrices with large output in Mathematica [duplicate]

If we have the large matrix A=RandomReal[{-10, 10}, {1000, 1000}]; and I need it for further calculation, how can I save it on hard disk and then call for ...
440 views

How to execute kernel command from Front End?

Documentation for Yuri E. Kandrashkin's OptionsExplorer package says to add the following menu commands in MenuSetup.tr: ...
250 views

Plotting a contour line in 2d on a 3d surface

I have a list of data which I can plot as a surface with ListPlot3D. Moreover I have a set of other surfaces and I have plotted the projection of their intersection ...
135 views

Upload a file using a WolframCloud WebForm

I tried to create a Webform in WolframCloud that asks/browses for a file and then uploads it to a specific folder. The following are the directions I investigated but it does not work: ...
141 views

How to fix a PDF line rendering problem in V9

If I run this in V8 ...
294 views

Preparing 2d plots for publication

When it comes to plotting a data my general attitude is to avoid post processing (say with adobe illustrator) as much as possible. To follow this strategy I would like to prepare publication-ready pdf ...
145 views

How can I determine the hyperlink of a currently opened documentation page programmatically?

Every pages in the documentation has a hyperlink. Here are some examples: ...
254 views

Riemann-Spherical Projection of Network onto the $\mathbb{R}^2$-Plane

I'm trying to find a way to plot the graph ...
269 views

Is there something akin to “SubgraphIsomorphismQ” in Mathematica 9?

Provided two unlabeled graphs, $G$ and $H$, I would like to test where $H$ is a subgraph of $G$. In other words, I'd like to test whether we can prune some fixed number of vertices or edges from $G$ ...
514 views

NestList and Euler's method

I am new to mathematica and so just experimenting with various programming constructs. Recently have been looking at NestList and how I could use this to implement ...
770 views

Using PlotLegends

Please don't answer this with "Just trash PlotLegends" or anything like that as I have tried homebrew solutions. I keep running into problems which I can't debug as ...
3k views

Summing along rows or columns of a matrix

I have a list of rows in database such as {{a,b,c}, {d,e,f},{g,h,i}} I want to be able to add each row across and each column down (like a spreadsheet). In other ...
313 views

How do I dynamically change Manipulate controls?

What I'd like to be able to do is dynamically change the axis of a 3D plot inside a manipulate. For example if I have a function that has three input variables I'd like a 3D plot using 2 of the ...
126 views

How do I force columns in a Grid to be equally spaced?

Suppose that I have this table tab, which I display using Grid. Is it possible to force the columns to be equally spaced? All ...
691 views

Efficiently exporting many images as a video

I have many .gif images and I would like to export them as a single video file (I prefer .mov, but any video format is fine). But what if I have several tens of megabytes of .gif images? Is it ...
2k views

How to use a matrix variable for a compiled function

I want to compile the following function which takes a matrix variable. ...
62 views

Interpolation on an unstructured (mostly-structured) grid in 4D+

I frequently need to perform interpolations on an unstructured grid. Mostly, with the purpose of filling grid holes and then later continue with regular grid interpolations. Mathematica V9 and V10 ...
353 views

Efficient method for Inserting arrays into arrays

This is strongly related to the following Questions: Looking for a way to insert multiple elements into multiple positions simultaneously in a list Building matrices by attaching vectors (columns) ...
116 views

How to model shocks to parameter in a dynamic system?

My simple model is: m[t_] := m[t] = m[t - 1]*p + 2 m[0] = 0 p = 0.5 I can plot the system as: ...
219 views

Sorting a large file

I have some huge logs, which are text files, containing up to a million rows each, and I need them sorted. Because trying to import one obviously makes Mathematica run out of memory, we must rule out ...
534 views

Generate random points in a region with higher probability in a sub-region

I am trying to generate random samples of points in the unit square in such a way that points inside a given circle are twice as likely to be selected as points outside of that circle. I tried to ...
328 views

Autoregressive distributed lag model

Could someone point me in the direction of creating an autoregressive distributed lag model in mathematica?
363 views

I am using MathLink with C/C++ on a Unix system in order to call a Mathematica (version 9) function and get the result. The function I need to call is a personal function of mine ...
477 views

How to solve this equation with integers as a solution?

I want to solve the equation $$x^y + y = y^x + x$$ with $x$, $y$ are integer numbers. I tried Solve[x^y + y == y^x + x, {x, y}, Integers] How to solve the ...
290 views

How to force Pane to always scroll to end of content? [duplicate]

Mathematica seems to know about the actual end of content position in a Pane if given large enough (but not too large$^1$) initial position value. Here, the ...
978 views

How do I find the best parameter to fit my data if the model is a interpolating function?

Hi I have a question regarding to find the best parameters for my model to fit my data. I have 3 ordinary equation, and I now just picked some parameters (...
986 views

Visualize eigenvectors at specified points?

I am very new to Mathematica and I got stuck about visualizing eigenvectors 2D and 3D. I want to visualize my largest eigenvector field of tensor data(15x15). I wrote this code for instance : ...
411 views

How to obtain a fixed number of solutions to $x+y=1$?

How to obtain a fixed number of solutions to $x+y=1$? For example, I want 4 solutions: $(1,0),(2,-1),(3,-2),(-2,3)$ I want to do this also on bigger equations such as $x+y+...=1$ and then I want to ...
168 views

Partitioning time series

I have a time series dataset I'm trying to plot by Year: ...
180 views

One to Many Lists Merge

I have two lists: ...
284 views

Tweaking Solve for systems of polynomial equations

I am trying to solve the following system of $6$ quadratic equations in $6$ variables: ...
566 views

Generating x,y coordinates for an edge detection

I'd like to be able to process a number of graphics that have edge contours and output a list of $x$, $y$ coordinates to be used for generating a spline in another program, or in Mathematica, to make ...
582 views

Monitoring the Evaluation of NDSolve: time to finish estimation

My problem is quite simple: I run a NDSolve with a system of many ODEs, a calculation that will run for many hours, and I would like to know the progress of the ...
66 views

Non-preemptive evaluation of a dynamic function? [duplicate]

I want to monitor a long calculation that is triggered by the release of a Slider. While one can indicate running calculations when the main evaluation loop is ...
Symbolic derivative of $n$-term product
I want to determine the relationship that must exist between the $x_i$ and $y_i$ such that $$\frac{\partial}{\partial\theta} \prod_{i=1}^n \frac{f(x_i,\theta)}{f(y_i,\theta)} = 0,$$ where  ...