All Questions

69 views

Can a whole Mathematica program be placed inside my functionMain? [on hold]

Consider this C code #include <stdio.h> int main() { printf("Hello world\n"); return 0; } A Mathematica equivalent could be ...
11 views

to solve this combinatorial optimization problem [migrated]

\begin{align} &\max_{C,E,S} \begin{aligned}[t] &\sum_{t=1}^{T}\sum_{k=1}^{K}min\left\{{\mu(\alpha_{k},e_{k}(t)),\gamma s_{k}(t)}\right\} \end{aligned} \notag \\ &\text{s.t} \notag \\ ...
28 views

Setting Marker Line widths in Legend

I have read all these posts and can not get this to work. I am trying to increase the width of the line in the legend. I have tried SwatchLegend, ...
21 views

Cell editing blocked after output generation

when I evaluate an editable cell and get an output cell with the result, then it is no longer editable until I delete the output. This seems to be a new feature in Mathematica 10 or do I simply need ...
27 views

Exploration of the region satisfying the follow conditions

I posting my code which I am using to find data points satisfying the following condition, but from this I can only able find data points of the certain curve. But I want to find the whole region ...
43 views

Here is the question. Consider the function f(x) = (2-x)/(x+1). -Find all points on the graph of f where the tangent line is perpendicular to the line y=4x. -For each point, report the equation of ...
29 views

Reading a .txt file with numbers

The .txt file is: tb_FeSe_22_12_2014.csv 0.00102786 (-0.000421863,1.58589e-09)(-4.04766e-05,2.67116e-07)(-8.4396e-06,-1.54976e-07) I would like to Import it to Mathematica such that I have: ...
37 views

99 views

How to get output in a specified format

In Fortran, we can easily get the stardard and easy output format. Now, we only focus on the Integer output. See here How to realize this kind of output as formatted text file using Mathematica ? ...
113 views

How to find out where an error occurs?

I got this error when using Mathematica: ...
106 views

Solving for the limits of an integral

I am trying to get Mathematica to solve for the symmetric limits of an integral of a Square Wave. ...
90 views

Only one root at specific interval

I need a help to find k here: $f(x)=-k^x + x^2$ It is not too simple. I have interest to find the single value of "k" where, inside interval {x,2,3}, the function have only one value to x when f(x) ...
40 views

QuantityVariable usage

When I try to run the following code, Mathematica gives me an error message: "Solve was unable to determine the units of quantities that appear in the input." ...
25 views

How to find $Proj_M(x,y)$ where $M=\{(x,y)|2x+3y=0\}$ is a closed subspace in a Hilbert space H [closed]

==================================================================== Consider the set $M=\{(x,y)|2x+3y=0\}$, in $(R^2,||.||_2)$. Given $(x,y) \in \mathbb{R}^2$, find $P_M(x,y)$, where M is a closed ...
60 views

Export collection of plots to A4 pdf

Sometimes I want to Export a collection of plots or other Graphics to a pdf in A4 format. Right now I'm using a GraphicsGrid inside a panel which is an inset in a Graphics object. Here is an example: ...
57 views

Delete data were y = “NS” in a list with elements {x, y} [duplicate]

I have a list of data {x, y}and not all of them have actual values. They show as {x, "NS"} or ...
34 views

Using lists for creating another list [closed]

I have list ("F") of numbers of length n. asthma = ((A - B)/A)/Sqrt[XXX], where "A" and "B" are also lists of numbers of length n. The thing I need is that "asthma" will also be a list of numbers ...
76 views

To be honest, I don't know if the problem is with Mathematica, or with the file; it's been generated by PicoScope, a PC-based oscilloscope software, not Matlab. The error I get in Mathematica 9 when I ...
36 views

plotting a box in Mathematica [closed]

I know by using UnitBox box of width of any extent and height of 1 unit can be plotted as ...
505 views

Flatten nested lists

I have a list as follows lis= {a, {{{b}, {c,d,e}}, {{f}, {g,h,i}}}} which I would like to flatten to ...
67 views

Plot Bivariate Data with Marginals

I would like to plot bivariate data along with the marginal distributions. I've arranged the plots in a GraphicsGrid as below but the marginals are centered away from the bivariate plot and I wonder ...
61 views

Misunderstanding the difference between Map Apply (@@@) and Map (/@) [duplicate]

Here's a minimal working example of a problem I'm having: ...
87 views

Delete rows based on specific periods

I have data (.xlsx format): two columns - data in first column imported as DateObject (dates with specific time), data in second column are numbers (113388.28, 865165.98 etc.). I want to delete the ...
98 views

Catch and Throw command [duplicate]

I am trying to find the time and maximum height of a projectile motion with air friction however Mathematica is "running" for a really long time and not giving an answer. Is there something wrong with ...
48 views

Simplify large fractions

Hi i'm quite new with Mathematica and i'm experiencing some problems with Simplify and FullSimplify. I'm dealing with a sistem ...
44 views

How do I simplify an algebraic equation with respect to a specific variable? [closed]

I have the following equation -- which is all in terms of d: ...
48 views

NDSolve with known tolerance function

I would like to solve the differential equation: y'[x]=F[y[x],x] with y[0.5]=y0 and x ...
198 views

Palette button with progress bar

Let's say you have a palette with a button that has to do some time-consuming task when clicked: ...
46 views

the equation has smll 1,2, why? [closed]

the result is wrong, cause it has small 1,2, on the right hand of the corner. I don't know how to solve it about the calucate
43 views

ContourPlot color problems

I tried to use contourplot to a 2D fucntion with rescaled color, the code is given below ...
172 views

Random walk with fixed initial and final coordinates and the length

Looking at the problem of a random walk in 2D or 3D, I would like to generate several trajectories that start all in some starting point, say, (0,0) in 2D and (0,0,0) in 3D and end up all in a ...
38 views

NSolve taking too long to solve system of polynomial equations

I am trying to solve a system of polynomial equations (10 variables and 10 equations) using NSolve in an attempt to find all solutions. ...