I'm J1 visiting scholar from China to the US. my adviser is nice before and taught me code line by line. I also studied very hard to modify this code to run the new application. But these 4-5 months, he got mad at me because I haven't got a good result. I even cannot discuss with him, every time I ask him a question he will get mad easily even I told him I used MATLAB to help me. He will sneer me "you can only use MATLAB". I don't understand why he did this to me?
then finally I found what he suggested me is not right, that's why I struggled. today I discuss with him about the U which he said this method is wrong. I spent few months to deal with this problem and finally, i found it's right, so no need to correct this part actually. however, he still gets mad and unsatisfied that I told him his suggestion has some problem.
Ok, there are so many occasions that I accept his suggestions to edit the code but code even cannot run. finally, I edit the code in my idea and fix the code which approves I'm right he is wrong. there are so many situations that he makes my research harder. before he really taught me how to write code but now he's unsatisfied about me every time.
what should I do?
1, listen to him to write wrong code to get the wrong result?
2, do it by myself to write correct code get right result but he doesn't buy it?