0
votes
0answers
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 ...
-1
votes
0answers
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 \\ ...
1
vote
1answer
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, ...
0
votes
0answers
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 ...
-1
votes
0answers
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 ...
-1
votes
1answer
43 views

Consider function is giving me imaginary numbers and incorrect answer, please help [on hold]

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 ...
0
votes
1answer
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: ...
1
vote
1answer
37 views

Applying functions repeatedly on parts of complicated expressions

I am dealing with expressions like $$ \textrm{expr}=5D_{4,1}\langle12\rangle\langle23\rangle\big(-\langle15\rangle^2\langle24\rangle\langle34\rangle + ...
4
votes
2answers
103 views

Using Throw within ParallelDo

I've noticed that I can't Throw from within a ParallelDo in the same way that I can from inside Do. For instance, the following will work as anticipated with Do but not with ParallelDo: ...
0
votes
1answer
31 views

Plotlegend does not work [on hold]

I am trying to add a legend to a plot, but sometimes it work and sometimes it doesn't work and I don't understand why. For example, when I use the following code, I get as an error "Unknown option ...
3
votes
1answer
52 views

subtleties about variable shadowing in Block[]

Let' s consider this packege : BeginPackage["myProgram`"]; myProgramF::usage = "arg + 1"; Begin["`Private`"]; myProgramF[arg_: 0] := arg + 1; End[]; EndPackage[]; ...
-4
votes
1answer
41 views

Show steps to compute limit [on hold]

I'm trying to use Mathematica to compute a limit, because I have no idea how to compute it by myself. The limit should be: $$\lim _{n\rightarrow \infty }\dfrac {2^{n+1}-n-2}{2^{n}}$$ Any ideas?
0
votes
0answers
27 views

Classify: other output representation

I'm working on a classisfy problem. The code is like: CMDDrf = Classify[trainingdata, Method -> "RandomForest"] Then I want to make a prediction based on a ...
-1
votes
0answers
16 views

How can I prove this using ONLY (L1, L2, L3, MP) by 19 steps [migrated]

How can I prove (┐p→p)→p using ONLY (L1, L2, L3, MP) by 19 steps?
1
vote
1answer
43 views

Wrong fit with FindFit

I have a set of data (Datax for x-axis and Datay for y-axes) to fit to a sigmoidal function (Hill type). While Origin gives me the right answer, Mathematica does not. The fit values given by Origin ...
2
votes
0answers
57 views

Differential Geometry on a MeshRegion

For many many years (honestly, since 1987) I've had my own MMa computational geometry code for dealing with 3D meshes. I principally (there's a joke there somewhere) use it to calculate coordinate ...
0
votes
1answer
34 views

Writing a text to a file including af mixture of signs

I'm trying to write this to a file: j/?xml version="1.0" encoding="UTF-8"?> However, when using WriteString, the "-marks are not accepted. If I use Write, however, the "-marks are accepted, but ...
1
vote
3answers
125 views

Deleting one of each chosen elements in a list containing duplicates [duplicate]

I want to delete one of each (and not all) selected element in a list containing duplicates. For example i have the list: $\{1,1,1,2,2,3\}$ and i want to delete $\{1,3\}$ so the leftover should be ...
0
votes
2answers
56 views

selection based on values of other list

I want to make a selection of a list based on the values of a other list list1 = { {1, 2, 3, 4}, {1, 2, 5, 6}, {2, 3, 4, 5}, {5, 6, 7, 8}} list2 = {1, 2, 3, 4} ...
2
votes
2answers
34 views

Count elements between matching opening and closing parentheses?

Suppose I have a List of the form: lst={"(", "x1", "x2", "(", "(", "x3", ")", "x5", "(", "x6", ")", ")", ")"} For each pair ...
2
votes
2answers
71 views

Dynamic updating of Slot number [duplicate]

I want to change the slot number inside Manipulate[]. Here is a minimal example which does not work: ...
7
votes
2answers
137 views

Clicking phase plane with mouse

Here is what I have thus far: ...
-3
votes
0answers
43 views

Integration problem with brackets [on hold]

$$\int_0^1 (1-2 x)^4 \, dx$$ How would you solve integration question you would use the chain rule for, if it was a differentiation question? Thanks :D
1
vote
1answer
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 ? ...
8
votes
2answers
113 views

How to find out where an error occurs?

I got this error when using Mathematica: ...
1
vote
2answers
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. ...
2
votes
2answers
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) ...
2
votes
1answer
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." ...
-4
votes
0answers
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 ...
2
votes
1answer
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: ...
0
votes
4answers
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 ...
0
votes
0answers
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 ...
2
votes
1answer
76 views

Mathematica doesn't read .mat file

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 ...
0
votes
0answers
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 ...
8
votes
6answers
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 ...
0
votes
2answers
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 ...
1
vote
1answer
61 views

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

Here's a minimal working example of a problem I'm having: ...
2
votes
3answers
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 ...
-3
votes
2answers
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 ...
2
votes
0answers
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 ...
0
votes
2answers
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: ...
3
votes
1answer
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 ...
7
votes
2answers
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: ...
-2
votes
0answers
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
0
votes
0answers
43 views

ContourPlot color problems

I tried to use contourplot to a 2D fucntion with rescaled color, the code is given below ...
5
votes
2answers
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 ...
0
votes
1answer
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. ...
0
votes
0answers
69 views

How could I add the WorldMap skin to this parametricPlot3d?

How could I stamp the worldmap inthis sphere of variable radius? I´m interested in the meridian of greenwich (longitude=length=0 Degree) is in the position of the longitude=length=0ºDegree of the ...
0
votes
2answers
79 views

Multidimensional Numeric Integration

I can't manage to calculate numerically the following multidimensional integral: ...

15 30 50 per page