Is there any way to split a number into its integer and decimal parts?
I've tried the int() "function":
int(5.5) = 5.
But I've got no idea how do I get the decimal?
Example:
(I have)
a = 12.34
(I want)
b = 12
c = 34
a = 12.34
b = int(a)
c = ????
Thanks!!!!
(Update)
My specific problem, here we have (thanks again for the support)
I have a set of data, with different blocks. For each block, I want to make the same plot. The title of the plot and the name of the output png depends on the block.
With this goal in mind I've created a loop
do for [j=0:int(A_blocks-2)]{
i=0 + 0.4*j
set output 'Mz_NMcs5000_Hext'.i.'_JC1_JSn05_JIntn05_R11_tSh2.png'
set title "H = '.i.' J_C = 1 J_S = J_{Int} = - 0.5"
plot filename index j using 1:5 w lp pt 5 lt rgb "black" title "Mag_T", "" index j u 1:20 w lp pt 9 lt rgb "red" title "Mag_{Int-S}"
}
The problem I have is that I only can concatenate using the dot if the value is an integer. I get this error:
internal error : STRING operator applied to undefined or non-STRING variable
1.23return23, and1.230return230? What do you want to do with the result?23or230in case of1.230? What do you want to get for example for5.001...1? and what do you want to get for5.01and5.1?1as well? I doubt. Please clarify.