Last change
on this file since 4 was
4,
checked in by zhangj, 10 years ago
|
Initial import--MML version from SOLEIL@2013
|
File size:
531 bytes
|
Rev | Line | |
---|
[4] | 1 | function [Out1, Out2] = mdriftpass(DriftData,Rin); |
---|
| 2 | % MDRIFTPASS - example of pass method in matlab |
---|
| 3 | % Same physics and calling syntax as DriftPass.c |
---|
| 4 | |
---|
| 5 | if nargin |
---|
| 6 | Out1 = Rin; |
---|
| 7 | NormL = DriftData.Length./(1+Rin(5,:)); |
---|
| 8 | Out1(1,:) = Out1(1,:) + Rin(2,:).*NormL; |
---|
| 9 | Out1(3,:) = Out1(3,:) + Rin(4,:).*NormL; |
---|
| 10 | Out1(6,:) = Out1(6,:) + NormL.*(Rin(2,:).*Rin(2,:) + Rin(4,:).*Rin(4,:))./(1+Rin(5,:))/2; |
---|
| 11 | else % If called with no input args - return lists of required and optional fields |
---|
| 12 | Out1 = {'Length'}; |
---|
| 13 | Out2 = {}; |
---|
| 14 | |
---|
| 15 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.