hey guys! I have a list of numbers and I want to round them to the nearest integer power of 10. Say, 850 would become 1000, 3.5 would become 1, 80 would become 100. But I cannot use functions in Round correct?
or, alternatively, anyone can suggest how I can rescale data to show up in a BoxWhiskerPlot where some of the data is very large and other is very small? My idea was to find a rescaling factor that would then also show up in the labeling of the plot
(the reason why I dont simply use Rescale is that I need to know what was the scaling factor used)
@MichaelE2 - this may be my tiredness speaking, but I also have numbers much smaller than 1, though never negative. When I try to transform Nearest to consider negative exponents, I get weird results. For instance, with 0
Hi all, this is a quickie: Say I have a replacement with an array, {x, 1} /. {x -> {2, 2}}, this will yield {{2,2}, 1}, if I wanted it to yield {{2,2},{1,1}}, how would I do the replacement?
I have {{a1,a2,b1,b2,2},{a3,a4,b3,b4,3},.....} and I want to generate 4 groups for each subset based on the last number in that subset that defines the location of the change. So the above array will become {{{a1,a2},{b1,b2},{b1,b2},{b1,b2}},{{a3,a4},{a3,a4},{b3,b4},{b3,b4}}} any ideas??
@MichaelE2 No that's not really what I'm going for here. Imagine a replacement where the replacement still takes place even if the replaced object does not appear in the element
Maybe a better example: {x, x^3+1,x-2,0} /. x->{2,2} yields {{2, 2}, {9, 9}, {0, 0}, 0}, I'd want that last zero to be {0,0}.
@Guillochon I think it's not quite safe. It's possible that a constant might be replaced in a place where it would not thread correctly. At least, until I can see that definitely cannot happen, I'd have to consider it a potential issue.
@halirutan when the last number is 2, the second group and up are different from the rest. similarly, when the number is 3, the third group and up are different from the rest
@SjoerdC.deVries Apparently rasher has requested that his account be deleted. I do not know why, but if I did I would probably not be able to say anyway. What I can say is that I will personally miss his unique and powerful contributions and his spirit of collaboration.