Linked Questions
14 questions linked to/from Is this the most efficient way to round approximate integers to integers while leaving other Reals untouched?
4
votes
1
answer
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:
...
0
votes
0
answers
710
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
1
answer
71
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
...
36
votes
4
answers
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 ...
12
votes
4
answers
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 ...
10
votes
5
answers
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, ...
6
votes
2
answers
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?
...
5
votes
1
answer
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 ...
5
votes
2
answers
610
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
2
answers
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 ...
3
votes
2
answers
169
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
1
answer
227
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
2
answers
111
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
1
answer
55
views
How to correct not precise values
I have the source file file = "test.txt" with these values:
...