49 lines
1.2 KiB
Matlab
Executable File
49 lines
1.2 KiB
Matlab
Executable File
% Funzione che contiene i punti di partenza per il calcolo
|
|
% In particolare:
|
|
% - cYo rappresenta le coordinate Y di tutti i punti nodi imposte dal
|
|
% progetto per la correzione di offset;
|
|
% - cZo rappresenta le coordinate Z di tutti i punti nodi imposte dal
|
|
% progetto per la correzione di offset;
|
|
|
|
function [cYo,cZo,asseY_Rif_PCL,asseZ_Rif_PCL] = punti_noti_exe_PCL(asseY_PCL,...
|
|
DatiElabPreConvLink,elab_option,FileName)
|
|
|
|
[~,cE] = size(DatiElabPreConvLink);
|
|
[num,~] = size(asseY_PCL);
|
|
cont = 5;
|
|
if elab_option == 1
|
|
n = 2;
|
|
elseif elab_option == -1
|
|
n = 1;
|
|
end
|
|
cYo = zeros(num+1,1);
|
|
cZo = zeros(num+1,1);
|
|
|
|
while cont<=cE
|
|
%% Y
|
|
cYo(n,1) = cell2mat(DatiElabPreConvLink(1,cont));
|
|
%% Z
|
|
cZo(n,1) = cell2mat(DatiElabPreConvLink(1,cont+1));
|
|
cont = cont+13;
|
|
n = n+1;
|
|
end
|
|
|
|
asseY_Rif_PCL(:,1) = diff(cYo);
|
|
asseZ_Rif_PCL(:,1) = diff(cZo);
|
|
|
|
if elab_option == 1
|
|
cYo = cYo(2:end)';
|
|
cZo = cZo(2:end)';
|
|
elseif elab_option == -1
|
|
cYo = cYo(1:end-1)';
|
|
cZo = cZo(1:end-1)';
|
|
end
|
|
|
|
fileID = fopen(FileName,'a');
|
|
fmt = '%s \r';
|
|
text = 'punti_noti_exe_PCL function worked correctly';
|
|
fprintf(fileID,fmt,text);
|
|
fclose(fileID);
|
|
|
|
end
|