rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
copy_model_data_to_plot_params.m
Go to the documentation of this file.
1 function plot_params = copy_model_data_to_plot_params(model, plot_params)
2 % function plot_params = copy_model_data_to_plot_params(model, plot_params)
3 % Helper function copying extracting relevant information for plot_params from
4 % the model.
5 %
6 % This is especially for use with models using geometry transformation. Here,
7 % the geometry parameters also need to be known by the 'plot_params'
8 %
9 % Parameters:
10 % plot_params: structure holding the parameters for plotting.
11 %
12 % Return values:
13 % plot_params: the updated structure enriched with fields extracted from the
14 % 'model'.
15 
16 plot_params.geometry_transformation = model.geometry_transformation;
17 
18 plot_params.xrange = model.xrange;
19 plot_params.yrange = model.yrange;
20 if isfield(model, 'geometry_spline_type')
21  plot_params.geometry_spline_type = model.geometry_spline_type;
22  plot_params.geometry_transformation_spline_x = model.geometry_transformation_spline_x;
23  plot_params.geometry_transformation_spline_y = model.geometry_transformation_spline_y;
24  plot_params.hill_height = model.hill_height;
25 end
26 
27 if isfield(model, 'postprocess')
28  plot_params.postprocess = model.postprocess;
29  plot_params.gravity = model.gravity;
30  plot_params.clim = model.clim;
31 end
32 
function plot_params = copy_model_data_to_plot_params(model, plot_params)
Helper function copying extracting relevant information for plot_params from the model.