Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
Calculating the Hessian Matrix and Eigen Values
Posted 2014年6月17日 GMT-4 20:11 1 Reply
Please login with a confirmed email address before reporting spam
Hello,
I am using the tutorial "Pacemaker Electrode" in COMSOL 4.4, which gives me the voltage field in a 3D volume (cylinder) induced by electrical stimulation.
I figured out how to extract the voltage values in a CSV file, as well as the second spatial derivative in particular directions (d(d(V,x),x)).
Now, I would like to compute the hessian matrix at each point and the maximal eigenvalue of each of these Hessian Matrices, where each point is taken on a uniformly spaced grid. How can I do that?
I was thinking to export 6 different values (d(d(V,x),x),d(d(V,x),y),d(d(V,x),z),d(d(V,y),y),d(d(V,y),z),d(d(V,z),z)) in a file, and then import these values in Matlab, where I can fabricate the Hessian matrix. Then I would calculate the largest eigenvalue of each matrix in Matlab.
Do you have other suggestions to calculate these Hessian Matrices and Eigenvalues directly in COMSOL, or is this the best way to go?
Thank you in advance for your help.
Best,
Julien
I am using the tutorial "Pacemaker Electrode" in COMSOL 4.4, which gives me the voltage field in a 3D volume (cylinder) induced by electrical stimulation.
I figured out how to extract the voltage values in a CSV file, as well as the second spatial derivative in particular directions (d(d(V,x),x)).
Now, I would like to compute the hessian matrix at each point and the maximal eigenvalue of each of these Hessian Matrices, where each point is taken on a uniformly spaced grid. How can I do that?
I was thinking to export 6 different values (d(d(V,x),x),d(d(V,x),y),d(d(V,x),z),d(d(V,y),y),d(d(V,y),z),d(d(V,z),z)) in a file, and then import these values in Matlab, where I can fabricate the Hessian matrix. Then I would calculate the largest eigenvalue of each matrix in Matlab.
Do you have other suggestions to calculate these Hessian Matrices and Eigenvalues directly in COMSOL, or is this the best way to go?
Thank you in advance for your help.
Best,
Julien
1 Reply Last Post 2014年6月23日 GMT-4 06:51