discrete second order derivative operator for unequally spaced data
Afficher commentaires plus anciens
Hi,
I need help to obtain a discrete second order derivative operator, that could be applied on a matrix. The best way, I guess, is to reshape the matrix into vector form and create a diagonal matrix with the operator, which is easy for equally spaced data in the matrix,but how can I incorporate the distances (width and heigth of the cells) for unequally spaced data?
Thanks
2 commentaires
Matt J
le 14 Fév 2013
I don't see how a diagonal matrix could ever give you a derivative operator, even with equally spaced data. A diagonal matrix can only weight each element of the operand independently, not take differences between them. Please describe the organization of your data more clearly. Does each column of your matrix contain signal samples to be differentiated? Is the spacing between these samples the same for all columns?
David Kusnirak
le 15 Fév 2013
Réponses (4)
Teja Muppirala
le 15 Fév 2013
Could you possibly use the GRADIENT command? This allows you to pass in unevenly spaced values for X and Y.
help gradient
3 commentaires
Youssef Khmou
le 15 Fév 2013
hi, you mean, apply the gradient twice ?
Teja Muppirala
le 15 Fév 2013
I though he meant a first derivative (to second order accuracy), so just calling GRADIENT once.
Youssef Khmou
le 15 Fév 2013
ok
Youssef Khmou
le 15 Fév 2013
Discrete Laplacian :
del2(matrix)
Example :
[x,y]=meshgrid(-4:.1:4);
z=exp(-x.^2-y.^2);
dz2=del2(z);
Jan
le 15 Fév 2013
0 votes
David Kusnirak
le 15 Fév 2013
0 votes
Catégories
En savoir plus sur Interpolation dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!