
How to convert this Matlab script in Igor

jessy1157
I am relative a new Igor user and I am trying to make a Igor program that can do the following:
%% Given Data
k=0.39761; %Equivalent k
%% Approach Curves Data Sets
DATA2=load('C:\...\defl_ext.txt'); %collected Deflection from a dynamic approach curve[m]
DATA3=load('C:\...LVDT_ext.txt'); %Z Piezo Position [m]
% Filter
DATA2 = smooth(DATA2,15);
Fts0=zeros(n,1);
dgap=zeros(n,1);
Fts0new=zeros(n,1);
Zp=DATA3;
for i=1:n;
Fts0(i,1)=k.*DATA2(i,1);
end
%%Convert F-Z to F-d (nN vs. nm)
for i=1:n;
dgap(i,1)=-Zp(i,1).*10^9-DATA2(i,1); %nm
Fts0new(i,1)=Fts0(i,1).*10^9; %nN
end
%Find minimum force value (app), shift tip-sample distance
Fts0min = min(Fts0);
gapp = dgap;
ind=find(Fts0min);
gapp_min=dgap(ind,1);
for i=1:n
dgap(i,1)=-(dgap(i,1)-gapp_min);
end
plot(dgap,Fts0new,'-b')
It will be really appreciated if someone can give me some ideas of how to convert this to Igor.
Thanks:
Alexander Cartagena
But as a non-Matlab person, I am left wondering:
What is n and where did it come from?
What is that ... stuff in the file path?
What does the .* syntax mean?
August 5, 2010 at 07:49 am - Permalink
August 5, 2010 at 04:59 pm - Permalink
http://www.igorexchange.com/project/matlab
The only release is here:
http://www.igorexchange.com/node/1687
August 5, 2010 at 05:03 pm - Permalink