I'm simulating an ion beam with different charge states passing through two pinholes. I'm using random angles, from an external function, to evaluate the velocity components along the axes and solving the differential equation:(adsbygoogle = window.adsbygoogle || []).push({});

O=[0 0 0]';

f = @(t,ys) [ys(4:6); O];

options=odeset('RelTol',1e-7,'Events',@(t,ys)Event_Stop_Sorgente(t,ys,Pinhole1));

[t,ys] = ode23t(f,tspan,y_sorgente(i,:),options);

for the particle motion. The external function get some points from a sferic surface and uses their coordinates as direction cosine to get the velocity components from its modulus.

The problem I have is that only few particle with charge state 1+ can pass the pinhole, all the others can not and it doesn't make any sense if each particle has the same modulus of velocity. I'm doing something wrong, but I can't understand what, any suggestion?

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# [MatLab] Edit Delete Help with ion beam with many charge states

Loading...

Similar Threads - MatLab Edit Delete | Date |
---|---|

How to program this in Matlab | Feb 28, 2018 |

Matlab Making a short test for self-adjointness | Feb 23, 2018 |

MATLAB GUI Edit text to Matrix | Mar 5, 2012 |

Matlab GUI: putting several edit text inputs in one matrix | Mar 29, 2010 |

**Physics Forums - The Fusion of Science and Community**