![]() The Matlab code I'm replicating: load S_phi.mat They are both in the same folder, use the same functions and the same data. ![]() However the two python files I have should give exactly the same answer, which they don't. The Matlab results differ slightly from the Python results due to different interpolation alogorithms etc. The new one does not work as expected and I can't find why. The old (not always stable) python file does work fine in the situation I'm testing and I can compare values. ![]() Now I'm trying to rewrite the Matlab to python. I also have a script in Python that works, but doesn't do so well when a discontinuity in angles is found. This worked fine and stabilized the script.Ĭurrently I have a script in Matlab that works and is stable. To solve the problem you get when interpolating between 350 and 10 degrees (the discontinuity issue) I used unwrap in Matlab. ![]() I later found that the matlab script had some problems which made it instable: interpolation over degrees. I had a script in Matlab that worked, I wrote the same script but then in Python that also worked as should. Since recently I have been working on a script which I have working in Matlab but need in Python.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |