MATLAB Answers

Calculating Skewness of an ECPT signal from temperature data on spreadsheet

Hello,
Can someone please give me a helping hand on this please?
I am actually trying to calculate the skewness of eddy current pulsed thermography signal from a large set of tempereature datas collected from a sample of a corroded metal and produce a skewed image of the processed datas. The problem is, after I've generated a code in to calculate the above mentioned skewness, the command windows returns an error regarding some of my code lines. Also, I need to use the large number of temperature data stocked on excel spreasheets files and I don't seem to be able to find the appropriate method to import them into my program.
I'll be glad if somoene can guide me on what to do regarding this issue, even though I seem not to explain everything conviently...
BTW the data should be imported and used as matrices
The code is as shown below
Thanks in advance
%This m file is used for calculating the skewness of ECPT signals
%120*640
Frame_number=310; % Define the number of all frames. It depends on the data.
M_skew=zeros(240,640); %reset the result matrices
M_3=cell(Frame_number,1);
%make a 3-D matrices. each cell is a 2-D ECPT map.
for i=1:Frame_number
%name_temp=['Frame',num2str(i)];
%M_3{i} = name_temp-Frame0;
M_3{i} = eval(['Frame',num2str(i),'-Frame0']);
end
for i=1:120 %get the result skewness matrices. 120*640
for j=1:640
a=zeros(Frame_number,1);
for k=1:Frame_number %acquire the data for one pixel of the ECPT map
a(k)=M_3{k}(i,j);
end
sd=std(a);
x_bar=mean(a);
suma=0;
for k=1:1:Frame_number
suma=suma+(a(k)-x_bar)^3;
end
M_skew(i,j)=Frame_number*suma/((Frame_number-1)*(Frame_number-2)*sd^3); %calculate the skewness of Frames
end
end
imagesc(M_skew);hold on
colorbar;

  0 Comments

Sign in to comment.

0 Answers