SHARE
TWEET

Untitled

a guest Jul 17th, 2017 43 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. A=[99.23;100.05;91;107.71;104.1];
  2. B=[3441 3441 301720.5;68750 1068750 0;170040 13085020 0;229350 229350 5729350;34194000 0 0];
  3. N=[300000;1000000;13000000;5500000;32800000];
  4. E=[-0.00302;-0.00261;-0.00208];
  5.  
  6.  
  7.  
  8. [c3,r3]=size(A);
  9. [c4,r4]=size(B);
  10.  
  11. Valorantigo(1:c3,1)=A(1:c3,1).* N(1:c3,1) ./100;
  12.  
  13.  
  14. x=sym ('x',[1 c3]);
  15. x=transpose(x);
  16.  
  17.  for i=1:c3
  18.     Valor(i,1)=symfun(0,x);
  19.     for j=1:r4
  20.         Valor(i,1)=symfun((Valor(i,1)/(1+E(j,1)+x(i,1))^j)+((B(i,j)/((1+E(j,1)+x(i,1))^j))),x);
  21.     end
  22.  end
  23.  
  24.  
  25. eqn=Valor(1:c3,1)==Valorantigo(1:c3,1);
  26.  
  27. [x1,x2,x3,x4, x5, param, cond] = solve(eqn, x, 'ReturnConditions', true);
RAW Paste Data
Top