function [matSamLat, matLatSam, obj] = ada3(matFeatSam, nLat)
% This function calls an R script to obtain archetypoids with non standardized data 
% It is based on the code for classic_aa.m Copyright Sohan Seth sohan.seth@hiit.fi
%
%
% Note: change path to R accordingly
%
% 

save classic_aa_Input.mat matFeatSam nLat
% In triton
% [status, msg] = system('/m/fs/software/R/ubuntu/R-2.15.1/bin/Rscript classic_aa.R');
% [status, msg] = system('Rscript classic_aa.R');
% if status ~= 0
%     disp(msg);
% end
system('R CMD BATCH C:\Users\GT\Documents\TFM\IsmaelCabero\programas\software\Simulation\ada3.R')
load ada3_Output.mat matSamLat matLatSam obj
!del classic_aa_Input.mat classic_aa_Output.mat %windows
%!rm classic_aa_Input.mat classic_aa_Output.mat
