Interesting that this was literally the major plot point in one of the GI Joe movies. I wonder if they got the idea from the movie. If you google around, the weapon in the movie created a lot of discussion about the real life viability and physics involved about this exact topic.
Here’s a clip of the weapon being used in the movie: https://m.youtube.com/watch?v=jOKf5r_JMAo