All Questions

4
votes
4answers
256 views

Generate Non-Singular Matrix of $n*n$ dimension

I want to create a function that will make an $n*n$ matrix which is non-singular that will always retrieve the same matrix (meaning that the matrix will not be random each time). I tried using the ...
2
votes
1answer
260 views

How to get the coefficient list

polynomial=-x^4+2 b x^3+(b^2-c^2+2 c) x^2+(2 b c-2 c d) x+c^2-d^2 This is good CoefficientList[polynomial, x] But how to ...
0
votes
0answers
73 views

RSolve and “the given boundary conditions lead to an empty solution”

I am trying to solve the following recurrence relation: ...
12
votes
5answers
500 views

Filtering elements from a list that appear only once

I want to be able to select elements from a list that only appear once. I originally had this: Select[Table[Count[list, i], {i, list}], # == 1] But the issue is ...
12
votes
1answer
576 views

ListSurfacePlot3D generates ugly artifacts

I have a list of $\{x,y,z\}$ pairs representing points in $R^3$. For every unique value of $z$ there are many $\{x,y\}$ pairs defining a polygon/contour in that particular $z$-plane. My dataset looks ...
13
votes
2answers
422 views

Paste data into Mathematica with formatting

Select the following Mathematica code and paste it into a notebook. In Windows 7(Mathematica 8) the line breaks are not interpreted in the expression. In fact any data copipasted from stackexchange ...
2
votes
1answer
134 views

Match a sequence of integers

I would to match a pattern p1 = 0,0,1,0,0 to the elements in listA. The elements are a boolean sequence that may look like this ...
27
votes
3answers
344 views

What bug fixes can be implemented in init.m?

In comments on this question, Mr. Wizard suggested a community wiki to share the bug fixes/workarounds (or possibly other tricks) people load in their init.m. I ...
0
votes
0answers
32 views

Asynchronous evaluation of a button's action [duplicate]

What would be the best way to have the value of x update before the pause (or a similarly slow function) finishes executing? ...
7
votes
2answers
216 views

Using MatchQ (or other means) to parse an expression using sums of COS or SIN correctly

I am writing a function that will take an expression as input. I want to make sure the expression is valid first before processing it. Looking for a correct to use ...
0
votes
1answer
134 views

Defining functions with changing number of variables [duplicate]

I am working with a bunch of functions of the form fn[x1_,x2_,x3_,...,xn_] := x1x2+x2x3+...+xnx1 where $n$ changes. Is there a way to create these functions ...
7
votes
0answers
707 views

Resources on Mathematica and strong AI (a.k.a. AGI)

David Deutsch (physicist / quantum computing theorist) wrote an article for Aeon Magazine last year: On Artificial Intelligence that got me thinking. The article assesses and critiques the ...
6
votes
1answer
91 views

Error when putting ??symbol in a cell with another expression

Putting ??symbol in a cell and another expression in a different row of the cell returns the following error: ??symbol 1 + 2 ...
4
votes
4answers
221 views

How to avoid writing $K$ loops?

I want to evaluate a mathematical function of $K$ variables each of variables varying between 1:N. One way to do this is writing $K$ loops and varying variables accordingly, as shown below: ...
1
vote
1answer
132 views

Error when using FullForm with ?symbol

Information[symbol] shows information about a symbol and is equivalent to ?symbol. ...
1
vote
1answer
112 views

What is the best way to produce a symmetric semi-definite matrix using as few variables as possible?

As we know, there are only $\frac{n(n+1)}{2}$ variables in a symmetric $n$-dimensional semi-definite matrix. Is it possible to produce a $n$-dimensional semi-definite matrix whose trace is $1$ using ...
1
vote
2answers
265 views

Error using Solve on Matrix Multiplication

I am trying to make a function the will find that value of $x$ in the following equation: $x.a=b$ all values of $x, a, b$ are matrices. The dimensions of $x$ are unknown, but $a$ and $b$ have the ...
4
votes
2answers
1k views

Solving Stochastic differential equation

How do I solve the following simple stochastic differential equation: $$ m x''[t] + \Gamma x'[t] + k x[t] = \sqrt[]{2 kb T/\Gamma)} \eta[t] $$ here $\eta[t]$ is brownian motion , i.e. Wiener ...
4
votes
4answers
663 views

How to show multiple images with a for loop

I wrote a simple application(I put the code in the end) to detect the parallel line pairs in the following picture: It returned three pairs of parallel line: ...
1
vote
1answer
156 views

Find size of vertex image relative to the graph coordinate system

I am trying to define a graph using my own VertexShapeFunction with an ActionMenu button being the vertex and a custom ...
7
votes
1answer
158 views

Why does Mathematica not simplify the Gudermannian function?

The Gudermannian function is built into Mathematica, but does not reduce to simpler terms in some simple cases. In particular, the Gudermannian is an odd function of real arguments but Mathematica ...
2
votes
1answer
102 views

Writing a function to mimic Characters

I am working my way through Programming Paradigms via Mathematica (A First Course) and have answered the following question in lesson 25: Write a function of one argument "s", a String, which ...
1
vote
1answer
92 views

Extract function parameters from “unevaluated” FormBox

I want to get the abbreviation for a Unit from its full name eg. "Newtons" => "N". Using ...
3
votes
3answers
154 views

HoldForm: how does it interact with nested evaluations?

Here's an example to illustrate the issue I'm having. right = 8 - y; left = y^2 + 6; integrand = HoldForm[Evaluate[right]] - HoldForm[Evaluate[left]] (I ...
4
votes
1answer
170 views

How do I put a Monitor into CDF?

I would like to keep track of progress of a database request in an Enterprise CDF, but it won't allow PrintTemporary or ...
-1
votes
2answers
95 views

Manipulate store values

Is there a way to store the numerical values from a manipulate function in the form of a table? For example, if the function is f[x_] := x^2 - 2x Can one store ...
5
votes
2answers
189 views

Transforming noisy multivariate data

I’ve been racking my brain all afternoon on trying to solve this… I have a set of noisy co-ordinate data data = {{x1,y1,z1}…..{xn,yn,zn}} that forms an ...
2
votes
2answers
410 views

EdgeRenderingFunction question

Bug introduced in 9.0 and fixed in 10.0.0 (Edit 1 : I added this paragraph after the original post, for context) Some context for this question can be found in another post ...
2
votes
2answers
527 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 ...
-1
votes
1answer
115 views

Permutation of arguments of product of functions

Given a function, g, which is symmetric in its argument, g(a,b)=g(b,a), consider the product g(a,b)*g(c,d)*g(e,f). I would like to get all the permutations of this product with respect to the ...
3
votes
0answers
181 views

Method Shrinkwrap Messes up editting Graphics

If you try resizing or moving the Inset in the following interface, the Graphics becomes incredibly jerky and borderline ...
3
votes
0answers
107 views

Using data from multiple cameras

ImageCapture[] has an option Device-> for specifying which camera to use, but ...
1
vote
2answers
77 views

Changing all link destinations in a notebook

I have a bunch of cells containing text and hyperlinks. i.e. of the form: ...
0
votes
0answers
294 views

Mathematica 9 link in OriginLab

Hi (I am an absolute newbie), I need to send Mathematica data to the program OriginLab to plot and change the graphs. Does anyone know if it is possible to send data from Mathematica 9 via ...
7
votes
1answer
600 views

How to set a zero offset for the frame origin?

I want to set a zero offset for the frame origin. In other words, the horizontal axis should start at exactly the lower bound, instead of having a small offset. For example, in the figure below, ...
1
vote
2answers
136 views

Creating a Table of Items for GIF creation

I want to create a table as shown below so that the steps from the first item to the second item, and the second item to the third item, etc. can be animated. I am not at liberty to post tested ...
18
votes
2answers
584 views

Blend code for built-in ColorData schemes

Hi I want to get a blend similar to "SunsetColors". To make those slight modifications, I would like to know the precise blend of that color scheme. My try: ...
10
votes
3answers
509 views

How to properly project a Graphics object consisting of line primitives

My problem starts from attempts at depicting overlapping lines of different thickness, i.e. ...
0
votes
0answers
85 views

Implementing a back button (in CDF)

I have a rather large notebook, which contains a lot of hyperlinks to different parts of the notebook. Is it possible to make a back button (maybe as a docked cell button?) so that when a reader ...
2
votes
1answer
104 views

How can I make check boxes that put elements into a list?

Right now I have a blank list that I am putting in Manipulate[]. I want to be able to choose whether 1,2, or 3 are in this list by setting z1,z2, z3 as True or False: ...
0
votes
1answer
165 views

Mathematica .m file can not open in Ubuntu

My operating system is Ubuntu. I add some new .m file to /usr/local/Wolfram/Mathematica/9.0/AddOns/Packages/ and then call for it in Mathematica, but failed with the message Get::noopen: "Cannot open ...
1
vote
1answer
178 views

in search for mathematica function similar to imagesc in matlab

Simple question: Is there any built in function for images that acts similar to imagesc in matlab, i.e. take grayscale image scale it to use full [0,1] range and then use some kind of colorgradient to ...
3
votes
1answer
432 views

Convert String to List of Numbers

I want to create a function that when a string is entered it will turn it into a list of numbers, these numbers are the numerical form of the characters in the string. e.g. a=1, b=2, c=3, d=4 and ...
0
votes
0answers
55 views

Identify columns of a huge matrix just polynomially many rows chosen at random

I am interested in the following problem in combinatorics $\Cap$ Probability. Let $\lambda \in \mathbb{N}$ be a parameter. Consider a matrix of $2^\lambda$ rows and $2^\lambda$ columns. Each column ...
0
votes
1answer
1k views

ContourPlot Legend with colorbar for arbitrary contour values

I have a ContourPlot in which I have specified the contour-values myself as Contours->{0.01, 0.05, 0.1, 0.2, 0.3}. I would like to get the corresponding contour-values to be shown in the color-bar in ...
9
votes
1answer
276 views

Mathematica9: NDSolve slows down after repeated calls

I have noted that in Mathematica 9 my code, which involves a lot of calls to NDSolve, slows down considerably after some time. Apparently, the problem is NDSolve itself and it seems to be related to ...
3
votes
2answers
973 views

Find a best fitting curve for some data with no regular pattern

Suppose some data with no regular pattern is given, so common patterns of functions all fail to fit it. Then how can one find the best fitting curve? I believe there will be some data for which we can ...
0
votes
0answers
128 views

How to define delayed coupon payment for FinancialBond?

When the coupon calculation end date falls on a holiday, it is customary to delay the coupon payment to the next working day. E.g. a bond may have a monthly coupon calculation period of 2013 Jul 18 to ...
10
votes
1answer
206 views

Infix form of PutAppend ( >>> ) does not work with variable

I'm new to Mathematica, so I suspect this question involves either a misunderstanding involving variables or the usage of >>>. On a webMathematica page ...
4
votes
1answer
116 views

Image Tooltip exported to HTML

Graphics@Tooltip[Hyperlink[{Purple, Rectangle[{0, 0}]}, "http://www.wolfram.com"], Graphics[Disk[]]] Is it possible to make image tooltip kept in the html?

15 30 50 per page