All Questions

1k views

Pass list of options to Plot3D

Consider the example plotOptions = {PlotPoints -> 10, MaxRecursion -> 2} Plot3D[x y , {x, 0, 10}, {y, 0, 10}, plotOptions] Why does this causes the error: ...
263 views

Antialiasing of horizontal lines

Consider the following graphic: g = Graphics[{Circle[], Table[Line[{{-1, i}, {1, i}}], {i, -1, 1, 0.2}]}, ImageSize -> 150] (You may need to look directly ...
157 views

Substituting confidential tagged cells by a “content removed” cell

When producing a notebook with both code and text, I often end up with pieces of code, or even entire chapters, that I don't want to be shown on the final output. I generally hide or close them by ...
2k views

Convert a string to hex number?

How can I convert a string containing a hex number such as "6b" to a hex digit that mathematica can use to do math with? I have tried using ...
5k views

How to get rid of warnings when using Solve on an equation with inexact coefficients?

When I solve this equation in Mathematica 8, I can get the right answer, but with some uncomfortable warnings. Equation: ...
5k views

Plotting Partial Sums of Fourier Series

I'd like to plot some partial sums for a Fourier Series problem, but I am not sure if the output I am getting is correct. I want to be able to plot the partial sums and the function on the same graph. ...
524 views

Solving $L=\frac{3}{2} \sqrt{4 \pi ^2 A^2+W^2}-\frac{\sqrt{5 W \sqrt{4 \pi ^2 A^2+W^2}+6 \pi ^2 A^2+3 W^2}}{\sqrt{2}}+\frac{3 W}{2}$ for $W$

When I solve the aforementioned equation for $W$ or $A$ on Mathematica I get a long and ugly equation in return, namely one of the solutions for $W$ is: (attempt to read at your own health) ...
1k views

How to make a resizable chess board?

For some reason I need to create a chess board. I can create a chess board by following command: ...
259 views

Complement on pre-sorted lists

Is there any way to instruct Complement to skip the sorting part? If the answer is no (likely), the next question would be: how can I remove from a sorted list ...
2k views

How do I simplify a vector expression?

I am doing vector analysis. I have figured out that the following expression won't be simplified in Mathematica: Simplify[Dot[x, y] - Dot[y, x]] I think the ...
3k views

Building matrices by attaching vectors (columns) and matrices

Having the need to attach a column to a matrix or to join matrices to make longer rows is an operation that I use very frequently and I find the Join function ideal ...
345 views

Composition of mappings not working as expected

I have two functions $f,g:\mathbb{R}^2 \to \mathbb{R}^2$ and I define a third one $h:\mathbb{R}^2 \to \mathbb{R}^2$ as the composition $$h(x,y) = g(f(x,y))$$ I'm trying to get this function into ...
2k views

312 views

Mathematica 10 doesn't support path containing Chinese characters

I tried to import file in Mathematica 10 ( windows 7 system), the path contains some chinese characters. After holding ctrl+shift, and drag the file into front end. I got path like ...
530 views

Finding a 3d curve from torsion and curvature with NDSolve

I'm trying to use the Frenet–Serret formulas to find the curve that matches the torsion and curvature I specify numerically with an InterpolatingFunction. The ...
341 views

How to make a control array of buttons or togglers?

An array of buttons From time to time I wish I had a control array of the sort native to Visual Basic. A control array of buttons would be a table of buttons in which each button "knows" its ...
670 views

Increase 3D Graph thickness for 3D printing in Mathematica?

My code: Plot3D[{(2*x*y)/(x^2 + y^2)}, {x, -2, 2}, {y, -2, 2}] Output: And now I can export this to STL by using the export STL command, however, when I try ...
558 views

How can I prevent Superscript from being interpreted as Power?

I have very strong desire to use superscript as the index of the variable. However, it looks like that the Mathematica automatically recognize the superscript as the power and I got message that my ...
291 views

How can I extract the points from a ListSurfacePlot3D?

How can I get numerical output of ListSurfacePlot3D, i.e., a list of all the points, $(x,y,z)$ , used to construct the plot? Thanks to your help I now have a list of (x,y,z). But the new mesh is ...
315 views

How to capture Print output

How can I capture output from Print from a function which does not leave the printed object as its final output, (and which I do not wish to edit)? E.g. ...
238 views

Synchronizing manual rotations for multiple Graphics3D outputs?

Say I make a set of three Graphics3D images, here of three different cones, by evaluating: ...
441 views

How to stop Animate animation when reaching a defined value

I have following code Animate[ Plot[myvariable x,{x,0,100} ], {myvariable,0.1,1},AnimationRunning->If[myvariable==1,False,True] ] How do I make the animation ...
1k views

Problem with plotting eigenvalues

I want to plot the eigenvalues of a matrix which is dependant on a parameter (well, actually I want to plot a tight-binding electronic band structure). The dimension of the hamitonian matrix is ...
465 views

This is something that should be simple, but the documentation and other questions don't seem to deal with it. I can think of mechanically doing it through a loop, but I know there must be a better ...
420 views

From a list of dates get a list of the last date available in a each month

I wondered if anyone has another or even a more direct way of finding the last dates of each month available from a list of successive dates? I currently do the following (note: nothing special about ...
558 views

Cropped pdf file after export

I have plot generated by Plot[] function that I want to export to pdf file. The problem is that Export[] function somehow cuts a ...
227 views

Is there something wrong with this piece of code involving Manipulate?

I am playing around with the Manipulate sentence. I think the following code is right, and actually Mathematica 9.0 doesn't return any error message, but I am ...
705 views

Frequencies represented in a DFT list (Fourier[])

I have a sound sample (sample rate: 44100). When I have a list l with n successive elements from the sample, ...
1k views

Manipulate using a variable defined outside of the manipulate function [duplicate]

I want to do something like this: expr := x^e; Manipulate[Plot[expr, {x, 0, 4}], {e, 1, 3}] But the plot shows up empty. Yes, it works if I do: ...
471 views

Stop Computation - Is Exit[] overkill?

The following example either finds a factor of the number $n$ or returns a message saying that the number in question is prime (I specifially wrote this to demonstrate my question below). ...
2k views

How to plot Fit functions?

If I do something like this f[x_]:=x^2 Plot[f[x],{x,1,10}] Mathematica plots the function $f(x)=x^2$, as expected. However, ...
404 views

Constrain movement of a locator inside Manipulate

Once again a big thank you for the great help in my earlier post: Plotting function with Dynamic parameter. It totally worked out. I now have a new coding problem ...
347 views

another way to do this mapping of a two argument function

Sorry, I'm just starting to learn mathematica. I have the following two-argument function: h[{x_, y_}] := x ^ y When I do the following: ...
384 views

What is wrong with my VectorPlot?

I am trying to make a simple plot of a spherical field falling off with distance from origin: ...
282 views

Why does the syntax highlighter color a local symbol red inside DynamicModule?

I am adding a Module inside DynamicModule here is an example (thanks to @rm-rf for this simple example) ...
217 views

Fitting a variable using multiple equations

I would like to find the best fit of two variables for a number of approximate equations, such as: 1x+2y+2=7.04 2x+y+4=7.98 1.5x+1.5y-2=2.53 1.8x+3y-1=6.77 That ...
158 views

Definitions inside ParallelTable?

How can I make definitions inside ParallelTable to use them outside? For example, if I execute: ...
407 views

How can I solve my system of differential equations?

I have a question pertaining to my code below: I require to find the values of the roots E2 that will set the function ...
434 views

Grid Lines in ListPlot

Why is Mathematica plotting a horizontal line at $y=2$ in the following example: ListPlot[Table[i,{i,1,10}],Frame->True,GridLines->None] How to get rid ...
242 views

How to apply a free-form input Function using InputField

I am trying to take a free-form input Function to create a list using NestList. ...
694 views

Putting NDSolve into ParametricPlot

I am having issues using Manipulate to plot the (numeric) solution to an ODE for different parameter values. I have a code that has several stages, which seem to ...
2k views

How to write a differential operator in Mathematica

I have a very basic question. I am trying to code the LHS of the differential equation: ...
1k views

Combined fitting via NonlinearModelFit

I am trying to fit my data to a combined function model. Say I have two functions with some common parameter(s) f[x_]:= a*x^2 + b*x + c g[x_]:= d*x^2 + e*x + c ...