ExB drift velocity code equation
조회 수: 5 (최근 30일)
이전 댓글 표시
Hello, I would like to know if there is a better or more elegant way to code this equation and how I could get a better result? Not really sure. Any help will be appreciated. Thanks.
E = 0.1;
B = 20;
E = [0 0.1 0];
B = [0 0 20];
VE = cross(E,B)./B.^2
댓글 수: 0
답변 (1개)
John D'Errico
2023년 9월 27일
I might guess that what you really want is to divide by the square of the norm of B. NOT by the elements of B squared.
E = 0.1;
B = 20;
E = [0 0.1 0];
B = [0 0 20];
VE = cross(E,B)./norm(B)^2
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!