5
votes
3answers
420 views

Efficiently extracting an array subset given a separate array

I have two arrays. The first array consists of tens of millions of rows and three columns with a string, a number, and a string. ...
4
votes
2answers
270 views

How can I compare the previous value and the current value implemented during NestWhileList?

I am trying to write a part of my code. I am using NestWhileList. However, I couldn't find out the right syntax for testing. It should compare previous result and current result and continue if it is ...
7
votes
2answers
293 views

Changing parenthesis size for typography

I am using Mathematica to layout some mathematical formulas for publication. The guidelines specify that in case of nested parentheses the encompassing ones need to be bigger than the inner ones. So ...
0
votes
0answers
193 views

How to import data from Blender or 3DS max file? [duplicate]

I would like to ask how to import a file from Blender 3D application and make a isolines plot. What I intend to do is to make a terrain model in Blender, and make a topographic map of it in ...
6
votes
2answers
419 views

How to eliminate the zero real part of a purely imaginary number?

In Mathematica 9, a purely imaginary number, e.g. 0.9 I, will display as 0. + 0.9i in the output form. How can I eliminate the ...
1
vote
1answer
225 views

Syntax error: newline character interpreted as multiplication

I'm getting this error in Wolfram Workbench, and I don't know where it comes from: "Syntax error: newline character interpreted as multiplication" This error happens around an If[] function, in a ...
6
votes
3answers
656 views

Percentage axis ticks

To create a percentage axe in some plot I use this Ticks configuration: ...
0
votes
0answers
101 views

A good choice to find solutions of ODE

In order to rephrase the question. I would ask you to take a look at the following problem: I have this system of ODE: $$ \begin{cases} \dot{x}(t)= x(t)[r_1(t) -b_1(t)x(t- \tau(t)) - c_1(t)y^m(t)] ...
4
votes
2answers
922 views

Can mathematica solve this equation?

I have the following Mathematica code to solve an equation coming from isoparameteric finite element for quadratic tetrahedron element. I need to get the iteroplation fast and accurate. I only find ...
12
votes
1answer
472 views

Grid layout problems: different sizes when rendering on Mac and Windows

From the documentation for ItemSize: {w,h} make all items the specified width and height and In Grid, w is measured in ems, and h in line heights. This ...
5
votes
0answers
296 views

Use of Mathematica to generate report

I would like to generate a report for codes written in Mathematica, but I don't see basic features such as: Table of Content generator List of Figures Abstract Bibliography and other standard ...
8
votes
4answers
325 views

Is there a concise form of Which or similar conditional?

Suppose that I want to write a function fun that takes an Integer num as input, and returns ...
2
votes
1answer
378 views

Specifying unlabeled FrameTicks in Plot

I am running Mathematica 7. Suppose that I plot $\sin(x)$ for $x = 0..10$ and frame the plot using Frame -> True: ...
6
votes
1answer
248 views

How to view all graphs available in GraphData?

Is there a "gallery" view of all the graphs available in GraphData? I realize that some graphs may not lend themselves to such representation (e.g. some may have ...
10
votes
2answers
368 views

Compiling LinearSolve[] or creating a compilable procedural version of it

Earlier today I had a discussion with a representative at Premier Support about the 2 questions I've asked here over the past couple of days: Seeking strategies to deploy a function securely ...
1
vote
1answer
562 views

How to add derivatives to Hermite Interpolation?

I try to use InterpolatingPolynomial[{f[1]=2,f'[1]=3,f[2]=6, f'[2]=7, f''[2]=8}, Method->"Hermite"] in WolframAlpha, but it's wrong.
11
votes
4answers
2k views

How to modify function argument?

Usually in programming languages, function arguments are normal local variables, which can be modified. Is this not true in Mathematica? ...
2
votes
1answer
559 views

Problem with NIntegrate in NonlinearModelFit

We are receiving many error messages when using NIntegrate with NonlinearModelFit. Here is a much-simplified version of the code. It arrives at the correct answer after several messages saying that it ...
2
votes
1answer
369 views

How to figure out how to make WolframAlpha work predictably

I'd like to get football data out of Wolfram|Alpha and into Mathematica 9, but I'm having some minor difficulty. Naturally, I'd like to know how to accomplish this task (details below), but I'm more ...
8
votes
3answers
806 views

How can I get a running sum for a list?

I've got following data I'm reading from a file: ...
8
votes
3answers
1k views

Ways to compute inner products of tensors

One way to evaluate the following sums is combining Table and Sum: $u_{abcd} = \sum_{e=1}^3 v_{aeb}w_{ced}$ $q_{ab} = \sum_{d,e=1}^3 v_{d e a}w_{deb}$ It will look like ...
8
votes
2answers
265 views

Correct way to generate large data sets (i.e.forward yield curve )

I would like to generate a set of forward yield curve matrix of size 1000 x 100. First I defined my SparseArray of 1000 x100: ...
0
votes
1answer
741 views

Adding precision for the calculation of a function

I have some function $f(x)$ I wish to evaluate, which is yielding divide-by-zero errors for sufficiently large inputs. How do I increase the precision with which this function is evaluated in order ...
4
votes
2answers
575 views

How find the first element of a list greater than zero (or another criterion) when there is a symbol in the list?

I need to find the position of the first element of a list that is either greater than zero (or some other criterion) or a symbol. Something like ...
0
votes
2answers
332 views

What is the best way to export a table of numerics with legends ready for Word?

I want to put my table output into an MS Word document without having to edit it in word after, so I want to export it ready for Word in final version with complete legends and title. Is it possible ...
20
votes
2answers
643 views

How to get shadows in Graphics3D?

It was a shock to me when I found that in Graphics3D a surface is always transparent to the light sources: ...
12
votes
2answers
9k views

Placing x-axes label below rather than at end of axes

By default Mathematica places the x-axis labels at the end of the axes like Googling has suggested a way around this is to use Frame- for example ...
18
votes
2answers
1k views

How can I get Mathematica to produce better Fortran code?

I am new to Mathematica and I am trying to get to it to produce some expressions in Fortran code. However, it seems that Mathematica will output duplicated expressions, that is, expressions the need ...
17
votes
3answers
839 views

Optimising 2D binning code

I have a set of (x,y,z) data, 45,000 to be precise and I want to bin the z values in 256 equidistant bins based on their (x,y) values. The final array should be a set of 256x256 array with each slot ...
6
votes
5answers
356 views

Handling holidays in financial time series

I have two lists: list1and list2, which are financial time series with only 2 variables—date and price. The problem is: these ...
1
vote
0answers
58 views

Fit text to a path [duplicate]

Possible Duplicate: Movable text on a curve This is a common feature among vector-based graphics suites (e.g. Illustrator), so I was wondering how it could be done in Mathematica. Here's an ...
13
votes
0answers
168 views

func::usage needs to be run twice? [duplicate]

There is an annoying problem that I can't figure out why it's happening. I have defined a usage for a my function tensorA: ...
1
vote
1answer
147 views

need help with finding right syntax for an IF statement

I am working with two multi-variable functions A and B. They depend on some counting factors ...
11
votes
4answers
560 views

How to write this without For loop

Suppose I have a few lists of numbers and want to exponentiate element-wise, then sum up everything into a polynomial. For example, if I have ...
11
votes
3answers
313 views

Suspecting bug in Parallel Framework

I've reduced my actual problem to: ParallelEvaluate[ Module[{slot=1}, Slot[slot] ] ] gives error messages that I think shouldn't be there. It seems I can ...
7
votes
1answer
700 views

How to stop the Kernel from running wild?

How to abort or stop this (accidently large defined) SparseArray production? s = N[SparseArray[Table[{2^i, 4} -> i, {i, 30}]]] Alt+. or Alt+, seem to give ...
6
votes
2answers
223 views

Is it possible to use PatternTest and Optional value on one Pattern simultaneously? [duplicate]

Possible Duplicate: How to Combine Pattern Constraints and Default Values for Function Arguments First a simple example: define a function "add" with two arguments, and its second argument ...
4
votes
2answers
1k views

What is the best way to make a plot complete with legends so it is exported-ready for Word?

I want to put my Plot output into an MS Word document without having to edit it in Corel first, so I want to export it ready for Word in vector format complete with legends, expressions, axes, and ...
49
votes
3answers
23k views

How to create a new “person curve”?

Wolfram|Alpha has a whole collection¹ of parametric curves that create images of famous people. To see them, enter WolframAlpha["person curve"] into a Mathematica ...
6
votes
2answers
309 views

Is it possible to induce Mathematica to chop off parts of Graphics objects that exist outside of a Frame?

I am running Mathematica 7. In a Graphics environment I am setting Frame -> True (and using ...
1
vote
2answers
1k views

Can I improve the importing speed of Excel data?

I have data in an Excel spreadsheet that has 4 rows and 1,000 columns. I am using Import as follows: ...
5
votes
2answers
300 views

Concatenate strings from different levels of list

After a lot of trouble I've finally come pretty close to what I want to do. I now have a list that looks like this: ...
2
votes
1answer
110 views

Confused behavior using Dispatch to sort one list relative to another

I have a need to sort the entries of one list into the same sequence as the entries in a reference list. Because I have rather large lists involving strings, I'm trying to use Dispatch to accomplish ...
8
votes
1answer
231 views

How to automate x[i]→x_{i}?

I have several Mathematica expressions in which subscripts are expressed with square brackets. E.g. x[12] is meant to represent x12, etc. If I evaluate ...
4
votes
1answer
147 views

NumberForm and units

NumberForm can be used to print Quantities to a specified precision. For example, x=Quantity[5.123456789,"Meters"]; 5.12346 m Print[NumberForm[x,{4,2}]] 5.12 m ...
4
votes
1answer
207 views

Changing size and color of a Text on version 9

I am running v9 on mac pro and think that I am doing something wrong. When commenting the solution of a particular exercise I add a text cell (command 7) and type the comment which is nothing more ...
2
votes
3answers
495 views

How to format a large Number

There is a large number a = 123456789012345678901234567.123456789012345678901234567 By format with AccountingForm ...
4
votes
0answers
208 views

What's the kernel launch command syntax?

I want to configure a remote kernel, but the box it'll run on doesn't have a fixed hostname or IP address. I can however get its IP address by running a shell script. (For the moment I'm only worrying ...
11
votes
4answers
968 views

Pure Functions with Lists as arguments

Assuming I have two function: example 1: add[{x_, y_, z_}] := x + y - z add[{1, 3, 5}] If use pure function,I know I can write it as : ...
5
votes
3answers
275 views

Can one launch a Player Pro kernel independently of the front end

This question follows on from my earlier one, Seeking strategies to deploy a function securely without a front end. As it pursues a different track to solve the same problem it seemed distinct enough ...

15 30 50 per page