Linked Questions

4
votes
1answer
4k 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: ...
0
votes
0answers
508 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 <...
2
votes
1answer
62 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 ...
35
votes
4answers
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 ...
9
votes
4answers
3k 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 ...
10
votes
5answers
750 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, ...
6
votes
2answers
3k 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? ...
4
votes
1answer
2k 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 ...
5
votes
2answers
558 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 ...
2
votes
2answers
786 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 ...
3
votes
2answers
133 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
vote
1answer
109 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 ...
2
votes
2answers
102 views

How to select pairs of numbers in function requirements?

How can I get only those cases where the second column has only two decimal places or less? ...
0
votes
1answer
51 views

How to correct not precise values

I have the source file file = "test.txt" with these values: ...