# All Questions

132 views

### How can I create a shortcut for a command in Mathematica?

I am using mathematica to write my physics homework, one thing that trouble me is that I need to enter lots of vectors. I usually type the name of the vector, "A" for example, and then hit "[Ctrl] 7" ...
128 views

### Block anti-diagonalize a square matrix?

In Mathematica there is a very convenient function called JordanDecomposition[]. It takes a square matrix A as an argument and ...
113 views

### Draw two curves and a surface

I'm trying to draw two curves and a surface, where one of the curves is to appear on the surface. Unfortunately the curves are drawn with very few points and appear extremely unclear. Is there a way ...
61 views

### Sort Unicode characters

Sorting ASCII phrases works fine: Sort[{"albatrob", "abo", "dict", "star", "mangel", "m"}] (*{"abo", "albatrob", "dict", "m", "mangel", "star"}*) But unless I'm ...
520 views

### Projectile motion in Mathematica using Euler's method [duplicate]

I need to write the equations of a ball in projectile motion (ignoring air friction) with an initial velocity of 40 m/s at an angle of 40° with respect to the horizontal. Specifically, I need to write:...
213 views

### Is there a way to detach/reattach the Frontend from a running Mathematica Kernel?

I perform long calculations on a fast remote machine running the Mathematica kernel, where I followed the very useful guide Remote Kernel Strategies to establish the connection. I wonder, however, if ...
44 views

### Writing a math formula to order results in a certain way [closed]

I am not very well educated in math and I have a math puzzle that I'm trying to solve. I have the following list and each object has 3 numbers. The first 2 numbers are better when they are as high as ...
541 views

### Find (longest) overlapping elements between two lists

I am trying to write a function f that returns the overlapped sublist where A ends with this sublist while ...
122 views

### TimeConstrained[Delete[Range[1],1]] causes kernel crash

Run these two samples of code here (AFTER SAVING YOUR CURRENT WORK): Do[ TimeConstrained[ While[True, Delete[{1}, 1]; ];, 0.1];, {100}] ...
206 views

### Polar color coding for complex function plots?

Having browsed this Q on plotting complex functions and the Zeta page, I don't see anything as nice as this plot from Matilde Marcolli's slides "Geometry and physics of numbers". Looks like ...
88 views

### Weird subscript name in output [duplicate]

One of my first times using mathematica, I'm getting a weird Subscript(1,0) output when I try to solve a derivative. What is going on and how can I fix this?
514 views

### How do I adjust error bar tick size with ErrorListPlot?

I'm making a plot of data points from an experiment and the error bars are quite small. I would like the vertical error bars to have wider horizontal lines so that they are easier to see. Are there ...
211 views

85 views

### Replicate CommunityGraphPlot as a Graph

Is it possible to format a Graph object in a similar way to CommunityGraphPlot, but retain it as a Graph? I've been playing with FindGraphCommunities but I'm obviously missing some of the pre-...
103 views

...
165 views

### Replace missing data

I have vectors of equal lengths where I want to replace the zeroes (missing data) with their preceding values. So far I have written: ...
90 views

### Simplifying code

I have a program where I solve the Lorentz-63 system (system of ODEs). I wish to generalize my program to make my code cleaner. Is there any way to create a function that works in a fashion such as ...
97 views

### Prevent evaluation of certain cells / code segments

I´m not quite sure if I ask a stupid question but I could not find an appropriate answer in the forum... I have a variety of cells (= code segments) in my notebook which I would like to evaluate in ...
83 views

### Value of event function not a real number

I am having some problems with handling an event during NDSolve. The event itself is simple, I am looking for when one of my coordinates, defined in ...
78 views

My dataset is like: id, feat_1, feat_2, feat_8, feat_9, feat_10, feat_11, feat_17, feat_18, feat_22, feat_2, target 1, 1, 0, 0, 0, 0, 1, 2, 0, 1, 0, Class_1 2, ...
83 views

### Selective update of mySQL database column

I would like to update several entries in a mySQL database which I use in combination with Mathematica. But the following code does not work: Map[ SQLUpdate[conn, "table_name","column2update", {1}, ...
573 views

### Interpolation on a regular square grid spanning a triangular domain

Bug introduced in 10.0 and fixed in 10.1 Context I am trying to identify contours of a function which is sampled on a cartesian grid within an irregular (triangular) region. Here is the data <...
125 views

### What are Epilog x-Axis Positions In BoxWhiskerChart (with BarSpacing option)?

I have a dataset that has a number of groups with overlapping sets. There is a point in the group within the intersection of the sets that I want to highlight by placing a marker of that point between ...
117 views

### Function with condition

I am starting my adventure with Mathematica. I would like to know if is there possibility to create function described by formula for example f(x):=1+2^n where 2^n < x. I have problem with this ...
805 views

### Match opening and closing parentheses?

Suppose I have a List of the form: lst={"(", "(", "(", ")", "(", ")", ")", ")"} By running ...
24 views

### How to make the vertices move with the VertexRenderingFunction graphics when clicking and dragging vertices of a layered graph [duplicate]

I have read the suggested similar question here: VertexRenderingFunction (or EdgeRenderingFunction) with movable nodes? and Mr. Wizard's solution. Please could someone help me to apply his method to ...
474 views

I have a list of strings and I would check if there is an empty string element, that's "", because I need to replace it with a "0". I try the following ...