This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| myMean = 2; % RV mean | |
| myVariance = 3; % RV variance | |
| myLength = 100; % Length of random vector | |
| myOutput = myMean + sqrt(myVariance)*randn(1,myLength); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function myOutput = my_simulation_function(myMean, myVariance, myLength) | |
| myOutput = myMean + sqrt(myVariance)*randn(1,myLength); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| myMean = 2; % RV mean | |
| myVariance = 3; % RV variance | |
| myLength = 100; % Length of random vector | |
| myOutput = my_simulation_function(myMean, myVariance, myLength); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function myOutput = my_simulation_function2(myMean, myVariance, myLength) | |
| % Sample function that saves output to a custom file. | |
| myOutput = myMean + sqrt(myVariance)*randn(1,myLength); | |
| save(['my_simulation_output_mean_' num2str(myMean) '_var_' num2str(myVariance) '_length_' num2str(myLength)]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| myMean = -5:5; % RV mean | |
| myVariance = 3; % RV variance | |
| myLength = 100; % Length of random vector | |
| for i = 1:length(myMean) | |
| for j = 1:length(myVariance) | |
| for k = 1:length(myLength) | |
| my_simulation_function2(myMean(i), myVariance(j), myLength(k)); | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % Plotting take 1 | |
| x = 1e-2:1e-2:100; | |
| % Smooth curves | |
| y1 = exp(-x); | |
| y2 = 1-exp(-x); | |
| % Noisy curves | |
| n = length(x); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % Plotting take 2 | |
| x = 1e-2:1e-2:100; | |
| % Smooth curves | |
| y1 = exp(-x); | |
| y2 = 1-exp(-x); | |
| % Noisy curves | |
| n = length(x); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % Plotting take 3 | |
| x = 1e-2:1e-2:100; | |
| % Smooth curves | |
| y1 = exp(-x); | |
| y2 = 1-exp(-x); | |
| % Noisy curves | |
| n = length(x); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % Plotting take 4 | |
| numPlotPoints = 50; | |
| x = 1e-2:1e-2:100; | |
| % Smooth curves | |
| y1 = exp(-x); | |
| y2 = 1-exp(-x); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| numPlotPoints = 50; | |
| x = 1e-2:1e-2:100; | |
| % Smooth curves | |
| y1 = exp(-x); | |
| y2 = 1-exp(-x); | |
| % Noisy curves |
OlderNewer