6k views

### Change number from real to integer [duplicate]

Possible Duplicate: Is this the most efficient way to round approximate integers to integers while leaving other Reals untouched? Please consider the following: ...
• 4,391
712 views

### Remove decimal point from N function [duplicate]

For aesthetic reasons I want to remove the decimal point when I use the function N. For example when put in N[30] I get out <...
• 691
72 views

### If function's argument is close to an integer how to choose the function definition for the integer argument? [duplicate]

I have the following function which is expressed through the numerical integration ...
5k views

### Looking for "Longest Common Substring" solution

I'm looking for robust code to solve the "Longest Common Substring" problem: Find the longest string (or strings) that is a substring (or are substrings) of two or more strings. I can just code it ...
• 8,693
5k views

### Test if number represents an integer

I can't figure out how to test if a number is an integer. I have found IntegerQ, but this function only checks if the type of the input is an integer, not whether ...
• 251
1k views

### Getting AbsoluteTiming to display in hours, minutes, and seconds

I'm doing some extended length calculations and was wondering how I could get AbsoluteTiming to display in hours, minutes, and seconds. I googled and found nothing, ...
4k views

### Converting numbers to integers

I've read the available documentation but I still haven't found an NumberForm -> Integer function yet. No result in this site's search, either. Does it exist? ...
• 3,415
3k views

### Axis label shifted in 3D plot

Does anybody know why the axis label is shifted in this plot? Probably because of the different lengths of the labels of the ticks? How can I have the axis label in the middle of the axis? The code ...
• 339
613 views

### Why is an integer not considered as a real?

Please consider the following: zeros={0.,0}; data={1, 0., 0}; DeleteCases[data, #]&/@zeros Head/@zeros (*{Real, Integer}*) (*{{1, 0}, {1, 0.}}*) For my ...
• 4,391
1k views

### Remove leading zero and trailing decimal from display of number

I would like to remove the leading zero and trailing decimal from the display of numbers in plots. For example, to get the correlation values to fit inside the cells of a correlation matrix, I can ...
170 views

### Writing a function for creating tick marks on plots

I have written the following function for creating tickmarks on the x and y axis. However, I don't understand that why it is not performing well at -0.1 and -0.6. ...
• 1,727
1 vote
245 views

### How do I to remove a factor of 1 [duplicate]

I evaluated Subscript[ε, 1, 2] = 0.5 Subscript[γ, 1, 2] 2 μ Subscript[ε, 1, 2] 1. μ Subscript[γ, 1, 2] How do I to remove ...
• 1,854