PsyDelic
Mechanical
- Aug 19, 2006
- 2
Hello,
is there anybody who knows how to change the matlab included diff() function to the following form:
own diff() function: Y= X2 - X1.....Xn+1-Xn
I just have created an m File where I do this manually seperate from diff() like:
for(c=1:1:length(x)-1)
Y(c)=[(x(c)-x(c+1))];
end
The sample code above takes a lot of time. For my data file (including 1,750,000 values)it takes about 10 hours. The matlabs own diff takes a piece of this time. Hope you can understand my request in this matter.
Thanks in advance.
PsyDelic
is there anybody who knows how to change the matlab included diff() function to the following form:
own diff() function: Y= X2 - X1.....Xn+1-Xn
I just have created an m File where I do this manually seperate from diff() like:
for(c=1:1:length(x)-1)
Y(c)=[(x(c)-x(c+1))];
end
The sample code above takes a lot of time. For my data file (including 1,750,000 values)it takes about 10 hours. The matlabs own diff takes a piece of this time. Hope you can understand my request in this matter.
Thanks in advance.
PsyDelic