8/8/2023 0 Comments Plot vs eigenvalues matlabWhat I'm wrestling with now is how to bring the eigenvectors into the picture (or into the code). RE the code I am trying to build: OK, so updating my code to something like this (per your help): =sphere However, the values I see for x, y, z when using this code does not match the values I see for when I used =sphere. R = ones(size(th)) % should be your R(theta,phi) surface in general As close as I can tell, it is running a code somewhat similar to this code, as shown here: N = 21 RE meshgrid: I understand how this function works now after viewing a few references, and how it is used by the surf function.Īs part of my exploration of understanding, I wondered how exactly the sphere function was populating its x, y, z matrices. I look forward to any comments you have for me. I am also totally disregarding the fact that the a, b, c terms are squared.so I'm not sure what kind of error I have introduced by simply multiplying my x, y, z coordinates by the "un-squared" eigenvalues. However, how do I know which eigenvalues correspond to a, b, c? (as far as I know matlab's default is to list the eigenvalues in order from smallest to largest) I need my x, y, z coordinates to be stretched so I need my a 2, b 2, and c 2 values to be less than 1? To me, it makes more sense to multiply my x, y, z coordinates by my eigenvalues.So I'm thinking it would be correct for me to write something like?: =sphere Therefore the sphere gets either stretched or squeezed depending on the values of a, b, c, in the x, y, z-directions, respectively. When a=b=c=1 we recover the equation of a sphere centered at the origin. The equation of a non-rotated ellipsoid centered at the origin is: Is it paired with the values in the y- and z-matrix that are located in row 3, col 4? (Thus creating a single x-y-z coordinate point) This next question is to understand how these three matrices are used to generate the surface of the sphere: looking at a value in the x-matrix, say row 3, col 4. The default size of 'n' is 20, therefore if I just use the function 'sphere' I am given three matrices that are 21-by-21 in size. From mathworks help, I see that, " = sphere(.) returns the coordinates of the n-by-n sphere in three matrices that are (n+1)-by-(n+1) in size."
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |