[Dart-dev] DART/branches Revision: 13110
dart at ucar.edu
dart at ucar.edu
Mon Apr 15 12:15:15 MDT 2019
thoar at ucar.edu
2019-04-15 12:15:15 -0600 (Mon, 15 Apr 2019)
53
Believe these are working under both 2015 and 2018
Modified: DART/branches/qc8diags/documentation/DART_LAB/matlab/gaussian_product.m
===================================================================
--- DART/branches/qc8diags/documentation/DART_LAB/matlab/gaussian_product.m 2019-04-15 13:22:19 UTC (rev 13109)
+++ DART/branches/qc8diags/documentation/DART_LAB/matlab/gaussian_product.m 2019-04-15 18:15:15 UTC (rev 13110)
@@ -237,9 +237,9 @@
'HorizontalAlignment', 'right');
align([handles.ui_text_posterior_mean, ...
- handles.ui_text_posterior_sd, ...
- handles.ui_text_posterior_weight], ...
- 'Distribute','None');
+ handles.ui_text_posterior_sd, ...
+ handles.ui_text_posterior_weight], ...
+ 'Distribute','None');
reset_Posterior();
hlist = [handles.PriorPanel, handles.ObservationPanel, handles.ui_button_Plot, handles.PosteriorPanel];
@@ -255,9 +255,9 @@
%This function plots the graph using the inputs in the 4 edit boxes. It
%makes changes to handles, so the function must return an update to
%handles. This is done through the function definition.
-
+
[prior_mean, prior_sd, obs_mean, obs_err_sd, is_err] = g_prod_plot(handles);
-
+
% If there is an error, zero out the posterior text values
% don't try to do posterior computation
if(is_err)
@@ -264,13 +264,13 @@
reset_Posterior();
return;
end
-
+
% Compute the posterior mean, sd and weight
[post_mean, post_sd, weight] = ...
product_of_gaussians(prior_mean, prior_sd, obs_mean, obs_err_sd);
post_handle = plot_gaussian(post_mean, post_sd, 1);
set(post_handle, 'Color', atts.blue, 'LineWidth', 2);
-
+
%Round post_mean, post_sd and weight to 4 decimal places
post_mean = round(post_mean * 10000);
post_mean = post_mean/10000;
@@ -278,25 +278,25 @@
post_sd = post_sd/10000;
weight = round(weight * 10000);
weight = weight/10000;
-
+
% Print values
str1 = sprintf('Mean = %.4f',post_mean);
set(handles.ui_text_posterior_mean, 'String', str1);
str1 = sprintf('SD = %.4f',post_sd);
set(handles.ui_text_posterior_sd, 'String', str1);
-
+
% Also plot the weighted posterior as dashed
post_handle = plot_gaussian(post_mean, post_sd, weight);
set(post_handle, 'Color', atts.blue, 'LineStyle', '--');
str1 = sprintf('Weight = %.4f',weight);
set(handles.ui_text_posterior_weight, 'String', str1);
-
+
h = legend('Prior', 'Obs. Likelihood', 'Posterior', 'Weighted Posterior');
set(h, 'box', 'on', 'Location', 'NorthWest')
-
+
end
- % These functions plot the graph immediately after the user edits a text box
+% These functions plot the graph immediately after the user edits a text box
function edit_prior_mean_Callback(~, ~)
g_prod_plot(handles);
Modified: DART/branches/qc8diags/documentation/DART_LAB/matlab/oned_ensemble.m
===================================================================
--- DART/branches/qc8diags/documentation/DART_LAB/matlab/oned_ensemble.m 2019-04-15 13:22:19 UTC (rev 13109)
+++ DART/branches/qc8diags/documentation/DART_LAB/matlab/oned_ensemble.m 2019-04-15 18:15:15 UTC (rev 13110)
@@ -474,30 +474,30 @@
%% -----------------------------------------------------------------------------
function button_create_new_ens_Callback(~,~)
-
+
% Disable the update ensemble button and all other active buttons
set(handles.ui_button_update_ens, 'Enable', 'Off');
set(handles.ui_edit_observation, 'Enable', 'Off');
set(handles.ui_edit_obs_error_sd, 'Enable', 'Off');
set(handles.ui_edit_inflation_label, 'Enable', 'Off');
-
+
% Clear out any old ensemble members if they exist
set(handles.h_ens_member, 'Visible', 'Off');
set(handles.h_inf_ens_member, 'Visible', 'Off');
-
+
set(handles.h_update_lines, 'Visible', 'Off');
set(handles.h_inf_lines, 'Visible', 'Off');
More information about the Dart-dev
mailing list