solve_use_matrix

PURPOSE ^

SOLVE_USE_MATRIX solve using reconstruction matrix

SYNOPSIS ^

function img= solve_use_matrix( inv_model, data1, data2)

DESCRIPTION ^

 SOLVE_USE_MATRIX solve using reconstruction matrix
 img= solve_use_matrix( inv_model, data1, data2)
 img        => output image (or vector of images)
 data1      => differential data at earlier time
 data2      => differential data at later time
 inv_model  => inverse model struct
 inv_model.solve_use_matrix.RM  = rec_matrix
 inv_model.solve_use_matrix.map = map to elements (optional)
    map is the size of the reconst model. contains
    zero if elem is unfilled, otherwise pointer to matrix row
 inv_model.solve_use_matrix.solve_nodes (default to elements)
    if 1, then solution goes to the img.node_data value

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function img= solve_use_matrix( inv_model, data1, data2)
0002 % SOLVE_USE_MATRIX solve using reconstruction matrix
0003 % img= solve_use_matrix( inv_model, data1, data2)
0004 % img        => output image (or vector of images)
0005 % data1      => differential data at earlier time
0006 % data2      => differential data at later time
0007 % inv_model  => inverse model struct
0008 % inv_model.solve_use_matrix.RM  = rec_matrix
0009 % inv_model.solve_use_matrix.map = map to elements (optional)
0010 %    map is the size of the reconst model. contains
0011 %    zero if elem is unfilled, otherwise pointer to matrix row
0012 % inv_model.solve_use_matrix.solve_nodes (default to elements)
0013 %    if 1, then solution goes to the img.node_data value
0014 
0015 % (C) 2008 Andy Adler. License: GPL version 2 or version 3
0016 % $Id: solve_use_matrix.html 2819 2011-09-07 16:43:11Z aadler $
0017 
0018 dv = calc_difference_data( data1, data2, inv_model.fwd_model);
0019 
0020 RM = inv_model.solve_use_matrix.RM;
0021 
0022 if isfield(inv_model.solve_use_matrix,'map')
0023    map = inv_model.solve_use_matrix.map;
0024 else
0025    map = 1:size(RM,1);
0026 end
0027 
0028 
0029 rec= inv_model.solve_use_matrix.RM * dv;
0030 sol = rec(map,:);
0031 
0032 % create a data structure to return
0033 try   img.name= ['solved by ', inv_model.name];
0034 catch img.name= ['solved by solve_use_matrix'];
0035 end
0036 
0037 solve_to = 'elem_data';
0038 try if inv_model.solve_use_matrix.solve_nodes == 1
0039    solve_to = 'node_data';
0040 end; end
0041 
0042 img.(solve_to) = sol;
0043 img.fwd_model= inv_model.fwd_model;

Generated on Tue 09-Aug-2011 11:38:31 by m2html © 2005