Obtaining EOF's from svds, orientation changes each time
5 views (last 30 days)
Show older comments
The orientation of the spatial EOF's keep changing each time I run the script. Im using the svds function with 2 singular values and the orientation of the vectors in the spatial EOF changes each time. Why is this?
2 Comments
Shashank Prasanna
on 22 Jan 2013
Could you share your code so that we can see why you see different results each time?
Answers (1)
Shashank Prasanna
on 22 Jan 2013
Are you running the whole script again, or just the SVD part? Since you are generating random numbers using RANDN you will be performing SVD on completely different numbers each time.
You can either add this command at the beginning of the script such that the same random numbers are generated each time.
>> rng(0) ;
>> %%%Rest of your code %%%
Or you can re run only the last 3 lines of code from SVDS so that you perform SVD on the same data again. You will see that the result must be consistent.
3 Comments
Shashank Prasanna
on 22 Jan 2013
Can you reproduce this issue with a smaller subset of your data? How off are your results wrt to precision of numbers?
Javier
on 18 Dec 2014
I have a little doubt about the procedure to compute the real-vector EOF: considering that I have N grid points with velocities for T time steps, I understand that I have to apply the svd decomposition to a 2NxT matrix where the first N rows correspond to the U points and the N+1 to 2N rows correspond to V. My doubt is: once the decomposition is performed (for example for the first 10 EOF modes) I obtain a 2Nx10 EOF matrix. Here I understand that again the first N rows correspond to the U component for that mode and from N+1 to 2N to V. Is it that correct? I'd really appreciate any help.
Thanks
See Also
Categories
Find more on Linear Algebra in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!