function [A_sqr_error] = func_8A1(measured_value, predicted_vector)

% Flag gets size of measured values
flag = size(measured_value);
% Check if measured values is a square matrix
if flag(1) == flag(2)
    message = {'Warnimg !';'Number of measurements is';' equal to number of values';' How is measurement arranged?'};
   %Show a dialog box to indicate the orientation of the measured values
   %and the number of measurements
    s = listdlg('PromptString',message,...
                'SelectionMode','single',...
                'ListString',{'In Colums';'In Rows'},'ListSize',[160,50]);
            if s==2
             measured_value = measured_value';
            end
             flag(1) =size(measured_value,1)+1;
            
end
%Check if the number of rows of measuredvalue is equal to the number of
%predicted values
if flag(1) == length(predicted_vector)
    measured_value = measured_value';
end

num_of_values = flag(2);
num_of_Measurements = size(measured_value,1);

A_sqr_error = 0;
for i =1:num_of_Measurements       
       A_sqr_error = A_sqr_error +(1/num_of_values) *sum((measured_value(i,:) - predicted_vector).^2);
end
 