Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.64 KB | None | 0 0
  1. SoC_m = abs((SoC1 - SoCk1));
  2.  
  3.     if h0 == h1
  4.         we = we0;
  5.         tau_e = (tau_e1 - tau_e0)*(SoCk1 - SoC_vec(idx0))/(SoC_vec(idx1)-SoC_vec(idx0)) + tau_e0;
  6.         h = h0;
  7.  
  8.             else
  9.                 if SoC_m < 0.05;
  10.                     mod = 1;
  11.                 elseif SoC_m > 0.05;
  12.                     mod = 0;
  13.                 end
  14.        
  15.                 if mod == 0;
  16.                     we = we0;
  17.                     tau_e = tau_e0;
  18.                     h = h0;
  19.                 elseif mod == 1;
  20.                     we = we1;
  21.                     tau_e = tau_e1;
  22.                     h = h1;
  23.                 end
  24.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement