Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Pinv with martix different answer from command windows and script

조회 수: 3 (최근 30일)
bondpen
bondpen 2018년 4월 13일
댓글: bondpen 2018년 4월 13일
So, so the commands works seperating in command windows but when i put into a script it seem to give me a different answer.
function x = script_21(A,b)
x=pinv(A)*b;
end
  댓글 수: 5
John D'Errico
John D'Errico 2018년 4월 13일
:)
As I expected. What often happens is you got sloppy. You called it with two different inputs, without realizing you did that. But you thought they were the same input.
One thing I learned a LONG time ago is to test everything I do. I know exactly what I have in every computation. Plot it. Look at the results. Verify everything, at every step. This teaches you to be careful. How did I learn that?
Because once, early in my career, I did some work for a client, getting an incredibly pretty result. I plotted it out. It was very nice looking. Then later, I tried to recreate what I did, doing what I thought I recalled having done before. I never did manage to get that pretty result, even from the original data. So what I must have done is screw it up. In some way, I created a result that looked like what I was expecting, what I wanted to see. It was just a mirage though.
bondpen
bondpen 2018년 4월 13일
Yeah, sometimes you create/make something wonderful but as much as you tired you won't recreate it, it won't be the same.

답변 (0개)

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by