5
votes
0answers
110 views

Is it possible to embed a cdf file into a GitHub Page

At the bottom of my page, I've added a piece of CDF js code, but it doesn't evoke the Wolfram CDF Player or Mathematica, so I can't play with it. And I wonder whether it's possible, since I know ...
0
votes
2answers
82 views

How do I use a passed-in symbol as a tag to define UpValues?

ClearAll@foo; foo[tag_] := ( tag /: tag[i_] := tag[[i]] ); a = {7, 8, 9}; foo[a]; a[2] I wanted the above to output 8, ...
2
votes
2answers
238 views

Solving Inequalities with Gamma Function

I am wondering why Mathematica outputs that the following system "cannot be solved with the methods available to Reduce". $\frac{\Gamma(\frac{1}{2}+n)}{n-1}<\frac{\Gamma(\frac{1}{2}+k)}{k-1}$ ...
3
votes
1answer
157 views

Mathematica Library

I created a Mathematica packagr and then I used the Needs function to add the library to my .nb file, but when use a function in my .nb file and the function is built in my library it comes up with ...
12
votes
1answer
293 views

Is there a guideline about when to end expressions with semicolons?

Whether for nested Ifs or within scoping constructs like Module and Block, I never know ...
-2
votes
1answer
85 views

I need to calculate sin[x] series summation for sin[A] where A is a 3X3 matrix

I am evaluating $\sin(A)$ where $A$ is a $3\times 3$ matrix. I have calculated it but now I want to check this with a Taylor series expansion of Sin[x]. What I am ...
3
votes
0answers
218 views

Sparse Principal Component Analysis

I'd like to run sparse PCA on some economic data. There appear to be several R functions available including elasticnet and PMA but I wanted to check if anyone had something coded up directly in MMA ...
1
vote
1answer
78 views

How do I extend (prepend or append to) an existing TagSetDelayed rule? [duplicate]

I have a TagSetDelayed rule associated with, say, tag: ...
10
votes
1answer
265 views

Cancellation of common terms

Can someone explain why the term A in case 2 does not get canceled out when case 1 does? I use "9.0 for Microsoft Windows (64-bit) (January 25, 2013)" ...
0
votes
0answers
26 views

Math cell symbols not in italics [duplicate]

If I type $y(x)=ax+b$ in a math cell, y, x, and b are italicized, but a and x are not. How do I make them italicized? I tried adding an \[InvisibleSpace] or a \[VeryThinSpace] in between, and it ...
0
votes
0answers
43 views

How to construct a list in a For Loop nested in a Parallel Loop [duplicate]

I've the following problem I cannot solve. I allocate an empty matrix, v, of size n x m. Then I want to do a Parallel loop (ex. ParallelDo), and do some operations (described by a function ...
3
votes
2answers
218 views

Extracting argument sequences from function expressions

Why is it that fun[x, y] /. fun[z__] :> z leads to Sequence[x,y] but ...
2
votes
2answers
74 views

Avoiding RandomVariate update with use of Locator

I am preparing an activity that simulates the response from a noisy spectrometer. The function I use to generate the data has the form: ...
0
votes
1answer
125 views

Problem with Plot of Solution for NDSolve [closed]

I'm trying to plot the solution of an equation using NDSolve. For some reason nothing shows up in the plot. I checked the output of the interpolating function and it doesn't look like there is ...
5
votes
2answers
553 views

Labelling objects in a picture with numbers

I need help processing a biology bacteria picture. I just started learning Mathematica and I hope you guys can use a simple method to help me solve the problem, please do not use super complicated ...
0
votes
1answer
804 views

How to properly substitute values into variables?

I have an array of functions in terms of a[0] through a[n] and I wish to replace the a[]'s with previously calculated values p[0] through p[n], as in below: ...
4
votes
0answers
195 views

Discriminant of Characteristic Polynomial

I'm doing a calculation which finds the characteristic polynomial of a matrix with rather complex entries and then determines the discriminant of that polynomial. For smaller matrices up to around 7x7 ...
5
votes
2answers
374 views

Exporting strings without the quotes

I'm trying to export the following string "sep = ," to a CSV-file, as to be able to define the separation symbol. However, when using the following command: ...
2
votes
3answers
309 views

find connectivity

Imagine a chain of 20 rings, labeled by 1-20 sequentially. We want to make random size sets of numbers randomly chosen from these 1-20 rings. No duplicate numbers are allowed. Example of a set: ...
1
vote
1answer
243 views

Help to solve exponential equation over positive integers

I am trying to solve the equation $\frac{4}{9} = \big( \frac{1}{3} \big) ^n + \big( \frac{1}{3} \big) ^m $ with $n$ and $m$ both positive integers. I type into Mathematica the following In:= ...
0
votes
1answer
158 views

Graphics with shapefiles using tooltip

I'm trying to write a code that displays an entire shapefile color-coded by one variable, and then as the mouse is moving it shows the local regional area of interest with all its data Got a working ...
0
votes
1answer
317 views

Normalization of eigenvectors

I am trying to normalize the following vector in Mathematica with the Normalize command. $$(-1+2\cot[x]\csc[x]+2\csc[x]^2,\;2^\frac{1}{2} (1+\cos[x])\csc[x],\; ...
2
votes
2answers
129 views

Solving a linear system

When I tried to solve the equation below, I got the $4$ errors. Since I am pretty new on Mathematica, I don't know what I did wrong. $24x_1+20x_2+16x_3=4$ $20x_1+20x_2+19x_3=36$ ...
2
votes
3answers
252 views

Differential equation of a physical property which can not be below zero

A simple question but maybe also interesting for others. I have the simple differential equation: a'[t] == -r The quantity a has a physical meaning and can not ...
0
votes
1answer
352 views

spherical polar plot of radial function [closed]

Can you please tell me how to plot $\sqrt{r}$ in 3d sph polar plot? In the spherical plot 3d there is no option I can put variable r. So how should I proceed.
1
vote
3answers
155 views

How to have a special grid as background of a plot?

I want to have a grid background for the function (2/5)*x+3/5 but with one small detail. I want the coordinates of the points to be in the centres of the background ...
8
votes
2answers
2k views

How to reverse the direction of the y axes

I have a similar question to this one. Unfortunately, the answers there didn't help me. I would like to plot a simple function with the normal Plot function. ...
0
votes
0answers
276 views

Non linear model fit mathematica

I want to fit experimental data (temp,alpha) to the following equation for calculating k and Ea -Log[alpha]^n = function(k,Ea,temp) However i do not know ...
1
vote
1answer
159 views

need help rotating an object about the z-axis using animation

This should be an easy question for anyone familiar with 3D animations. I have a 2D shape denoted by the equation ((x-1)^2+y^2) ((x+1)^2+y^2)==1 and I ...
2
votes
1answer
1k views

ListPointPlot3D with connected points?

With the command ListPlot[data,Joined -> True] I can visually connect adjacent data points in the array with lines. However, this option appears to be missing ...
0
votes
2answers
168 views

Specifying an array that may have an unknown number of entries [duplicate]

Say I'm running some process of unknown duration, and during the process, I need to periodically record the state of some variable. If we knew exactly how long the process took, we could simply ...
2
votes
1answer
299 views

How can I get dotted boundaries on a RegionPlot?

How do I plot something like $$\{(x,y): 1 \leq x^2 + y^2 < 9\}?$$ I want to be able to make the boundary $x^2 + y^2 = 9$ dotted line and the unit circle filled and coloured region in between? I ...
4
votes
3answers
369 views

Fast method for combining two lists

I have two lists, v1 and v2. Each element of the lists may be positive or negative. I want to create a list ...
6
votes
2answers
142 views

Best way to represent a joint distribution

The motivation for this question is producing a distribution that produces the gender and age of an individual when the distribution of ages depends on gender. Suppose I want a distribution which, ...
0
votes
0answers
59 views

How to stop a ParametricPlot3D from autorotating [duplicate]

The 3d graphic functions like ParametricPlot3D and ContourPlot3D always give me a rotating plot. Sometimes, I even can't stop it ...
2
votes
7answers
358 views

How to replace plus sign by comma

I want to replace plus by comma and the order of numbers in the list should be in increasing order. Example: a1 + a10 + a11 + a13 + a2 + a27 + a28 In this ...
0
votes
0answers
149 views

Solve system of non commutative operators

I'd like to use mathematica to solve systems of linear equations, where the entries are non commutative matrices. I just tried the NC package but it doesn't help so far. For example I can solve: ...
1
vote
1answer
86 views

Evaluating the tensor product many times for a given list

I need to evaluate the tensor product 10 times in a given list( {g,e,r}) Here I have evaluated for 3 times... ...
10
votes
0answers
264 views

How is the mysterious Raw function used?

I have never seen an example use for the mysterious Raw function: Raw[h, "hexstring"] constructs a raw data object with head h, and with contents ...
0
votes
0answers
141 views

Save open Mathematica Notebook from command line or second Notebook to avoid data loss

I was executing a long Mathematica Notebook over night. The Mathematica instance is running on a Linux workstation (in a vnc server session to be precise). Now I cannot access this session anymore, ...
1
vote
1answer
459 views

How to calculate the distance between UTM-projected coordinates?

My coordinates are projected using the following projection: proj= {"UTMZone32", {"GridOrigin" -> {500000, 0}, "CentralScaleFactor" -> 0.9996}}; Now I wish ...
4
votes
3answers
207 views

Reading binary strings from file as strings

I have a file that contains binary strings like 01011 00101 01011 I want to import the file to Mathematica as a list of strings, but ...
1
vote
1answer
3k views

How can I insert text into a relative position in a plot?

I use the following code to draw a parametric plot, with Epilog to add a point, and text using Graphics. ...
2
votes
1answer
109 views

FindRoot: Minimum Execution Time

Is there a minimum execution time for the command FindRoot? If so, can I get rid of it? For example, if I compute the time to solve the fundtion x=0, it takes around 0.27ms per evaluation: ...
0
votes
1answer
146 views

Piecewise of different functions

You know, NDsolve coupled with Piecewise can be used to solve a series of discontinuous differential equations. But what if one of the function is different? For example: ...
0
votes
3answers
126 views

How to find the Mean of results given as a list of Rules?

How can we find the mean of the following type of data? ...
1
vote
2answers
182 views

Add Piecewise functions expanding domains

I want to reproduce these plots for further development in Mathematica: To do so I defined the functions A and B as following ...
2
votes
2answers
125 views

Why I need Evaluate for the Plot of the probability density function of PolyaAeppliDistribution?

I encountered this when I was trying to answer this question. I just can't understand why the following code will only give a line at $y=0$: ...
1
vote
1answer
508 views

3D Printing in Mathematica Tutorials

Are there thorough tutorials on 3D printing for Mathematica? It seems that being able to export Mathematica files for 3D printing is unfortunately still a novelty, but it's vital for my business ...
1
vote
1answer
378 views

Removing the white space around plots when using customized FrameTicks

I'm using the CustomTicks package, which is part of the LevelScheme package, for styling the ...

15 30 50 per page