Skip to content

Commit be2cc03

Browse files
committed
export test results for use on vq_compare curves
1 parent 529cada commit be2cc03

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

octave/trellis.m

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ function test_vq(vq_fn)
511511
endfunction
512512

513513
% generate sets of curves
514-
function run_curves(frames=100, dec=1, nstages=5)
514+
function [EbNodB rms_sd] = run_curves(frames=100, dec=1, nstages=5)
515515
results_log = [];
516516
EbNodB = [0 1 2 3 4 5];
517517
for i=1:length(EbNodB)
@@ -523,9 +523,9 @@ function run_curves(frames=100, dec=1, nstages=5)
523523
ber_vanilla(i) = results_log(i).ber_vanilla;
524524
per(i) = results_log(i).per;
525525
per_vanilla(i) = results_log(i).per_vanilla;
526-
mse_noerrors(i) = sqrt(results_log(i).mse_noerrors);
527-
mse(i) = sqrt(results_log(i).mse);
528-
mse_vanilla(i) = sqrt(results_log(i).mse_vanilla);
526+
rms_sd_noerrors(i) = sqrt(results_log(i).mse_noerrors);
527+
rms_sd(i) = sqrt(results_log(i).mse);
528+
rms_sd_vanilla(i) = sqrt(results_log(i).mse_vanilla);
529529
end
530530

531531
figure(1); clf; semilogy(EbNodB, ber_vanilla, "r+-;uncoded;"); hold on;
@@ -538,9 +538,9 @@ function run_curves(frames=100, dec=1, nstages=5)
538538
grid('minor'); title(sprintf("PER dec=%d nstages=%d",dec,nstages));
539539
print("-dpng", sprintf("trellis_dec_%d_per.png",dec));
540540

541-
figure(3); clf; plot(EbNodB, mse_noerrors, "b+-;no errors;"); hold on;
542-
plot(EbNodB, mse_vanilla, "r+-;uncoded;");
543-
plot(EbNodB, mse, "g+-;trellis;"); hold off;
541+
figure(3); clf; plot(EbNodB, rms_sd_noerrors, "b+-;no errors;"); hold on;
542+
plot(EbNodB, rms_sd_vanilla, "r+-;uncoded;");
543+
plot(EbNodB, rms_sd, "g+-;trellis;"); hold off;
544544
grid('minor'); title(sprintf("RMS SD dec=%d nstages=%d",dec,nstages));
545545
print("-dpng", sprintf("trellis_dec_%d_rms_sd.png",dec));
546546
endfunction
@@ -559,7 +559,7 @@ function run_curves(frames=100, dec=1, nstages=5)
559559
%run_curves(600,1)
560560
%run_curves(600,2)
561561
%run_curves(600,4)
562-
run_curves(600,3,5)
562+
[EbNodB rms_sd] = run_curves(30*100,3,3)
563563

564564
%test_trellis(nframes=200, dec=1, ntxcw=1, nstages=3, EbNodB=3, verbose=0);
565565
%test_trellis(nframes=100, dec=2, ntxcw=8, nstages=3, EbNodB=3, verbose=0);

0 commit comments

Comments
 (0)