Replace elements that do not match a pattern
Image segmentation by pixel value
Can trees be made into graphs?
Layout tips to keep UI responsive
How to use $\LaTeX$ in Mathematica text
getting zero for special positions in a matrix
To Work with Barchart or DiscretePlot?
Replace elements that do not match a pattern https://mathematica.stackexchange.com/questions/149736/replace-elements-that-do-not-match-a-pattern
I have the following matrix mat={{0,a,b},{c,0,d},{0,0,e}} I would like to replace the zero elements of it with 1 and the remaining with zero. The first step would be mat/.{0->1} However I ...
- asked by Galuoises (12 votes), answered by eldo (7 votes)
Image segmentation by pixel value https://mathematica.stackexchange.com/questions/149966/image-segmentation-by-pixel-value
I'm looking for a way to segment a grayscale image (or a 2D array) by its pixel values. We look at two neighboring pixels, if their values are close within a certain threshold, then we say they are ...
- asked by xslittlegrass (11 votes), answered by nikie (11 votes)
Can trees be made into graphs? https://mathematica.stackexchange.com/questions/151155/can-trees-be-made-into-graphs
When one has the output of a function like TreeForm, for instance: Can this be turned into a Graph object? I would like to be able to apply functions like VertexList, VertexDegree, AdjacencyList, ...
- asked by M. Brandt (8 votes), answered by C. E. (5 votes)
Layout tips to keep UI responsive https://mathematica.stackexchange.com/questions/149835/layout-tips-to-keep-ui-responsive
Bug introduced in V10.4 or earlier and persisting through V11.1.1 CASE:3914402 Here is an example of a problem I have. Gutted version of something much bigger: handler2 = Framed[#, ...
- asked by Kuba (8 votes), answered by Kuba (1 vote)
How to use $\LaTeX$ in Mathematica text https://mathematica.stackexchange.com/questions/151102/how-to-use-latex-in-mathematica-text
I would like to formulate a question in a notebook for my students using $\LaTeX$ (or $MathML$) to typeset functions and matrices. I specifically want a language other than Mathematica as students ...
- asked by user49947 (7 votes), answered by Nasser (6 votes)
getting zero for special positions in a matrix There are a list list={{1, 2, 3, 2, 3}, {3, 1, 1, 2, 3}, {3, 2, 1, 3, 2}, {1, 2, 1, 1, 1}}; I wish to have all elements be zero except the first and the fourth in each row: desired: list={{1, 0, ...
- asked by Irreversible (7 votes), answered by tomd (7 votes)
To Work with Barchart or DiscretePlot? https://mathematica.stackexchange.com/questions/149960/to-work-with-barchart-or-discreteplot
I would like to create a graph similar to this below using some slightly dotted bar style like the one shown in the figure ... And I'm trying to open a space between bars 6 and 8, but I'm failing. ...
- asked by LCarvalho (7 votes), answered by kglr (6 votes)