In this file, I wanna create datum1 (nx2), datum2 (nx2) (n is variable) matrixes in gui environment like uitable so I can input columns and rows values where n is variable which mean is each enter pushes I want rows to increase (n+1).

4 views (last 30 days)
function [tp,ac,tr]=helmert2d(datum1,datum2,WithOutScale)
% HERLMERT2D overdetermined cartesian 2D similarity transformation ("Helmert-Transformation") % % [param, accur, resid] = helmert2D(datum1,datum2,DontUseScale) % % Inputs: datum1 n x 2 - matrix with coordinates in the origin datum (x y) % datum1 may also be a file name with ASCII data to be processed. No point IDs, only % coordinates as if it was a matrix. % % datum2 n x 2 - matrix with coordinates in the destination datum (x y) % datum2 may also be a file name with ASCII data to be processed. No point IDs, only % coordinates as if it was a matrix. % If either datum1 and/or datum2 are ASCII files, make sure that they are of same % length and contain corresponding points. There is no auto-assignment of points! % % DontUseScale if this is not 0, do not calculate scale factor but set it to the inputted value % Default: 0 (Use scale) % % Outputs: param 4 x 1 Parameter set of the 2D similarity transformation % 2 translations (x y) in [Unit of datums] % 1 rotation (ez) in [rad] % 1 scale factor % % accur 4 x 1 accuracy of the parameters (or 3 x 1 if scale factor is set to be 1) % % resid n x 2 - matrix with the residuals datum2 - f(datum1,param) % % Used to determine transformation parameters e.g. for cadastral purposes (transforming local system % to 2D mapping system) when at least 2 identical points in both datum systems are known. % Parameters can be used with d2trafo.m
% 09/12/11 Peter Wasmeier - Technische Universität München % p.wasmeier@bv.tum.de
%% Argument checking and defaults
if nargin<3 isempty(WithOutScale) WithOutScale=0 end
% Load input file if specified datum1=input('enter the point coordinates in 2-d for datum1') if ischar(datum1) datum1=load(datum1) end datum2=input('enter the point coordinates in 2-d for datum2) if ischar(datum2) datum2=load(datum2) end

Answers (0)

Categories

Find more on Mathematics and Optimization in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!