Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.95 KB | None | 0 0
  1. SigmaParametri = [1, 2, ...];
  2. RParametri = [11, 22, ...];
  3. MuParametri = [0.1, 0.2, ...];
  4. NumSimulazioni = 100;
  5. NumStep = 1000;
  6.  
  7. MatriceSuprema = zeros(NumSimulazioni, NumStep, length(SigmaParametri), length(RParametri), length(MuParametri));
  8. for SigmaIndex = 1:length(SigmaParametri)
  9.     for RIndex = 1:length(RParametri)
  10.         for MuIndex = 1:length(MuParametri)
  11.             Sigma = SigmaParametri(SigmaIndex);
  12.             R = RParametri(RIndex);
  13.             Mu = MuParametri(MuIndex);
  14.             for SimIndex = 1:NumSimulazioni
  15.                 Path = zeros(NumStep);
  16.                 for Step = 1:NumStep
  17.                     Path(Step) = 123; % Calcola il valore dello step usando solo 'Step' come indice
  18.                 end
  19.  
  20.                 MatriceSuprema(SimIndex, :, SigmaIndex, RIndex, MuIndex) = Path;
  21.             end
  22.  
  23.             % Se a questo punto devi fare la regressione:
  24.             MatriceDaRegredire = MatriceSuprema(:, :, SigmaIndex, RIndex, MuIndex);
  25.             Regressione(MatriceDaRegredire); % Poi che devi fa qui? Dove ti salvi il risultato? Boh!
  26.         end
  27.     end
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement