Why am I getting two different plots for the exact same matrix?
이전 댓글 표시
Hello, I am trying to plot these two matrices. One of them (BFF) I made myself while the other one (SF) is one i found, but I have compared the two and they should be the same (which is what I want, to replicate the Matrix SF). I made the matrix BFF from the vector fM1S1, but when I try to plot the two exact matrix, I get completely different results. Why?
댓글 수: 5
madhan ravi
2018년 8월 8일
upload your code and file
OCDER
2018년 8월 8일
What does this return?
isequal(BFF, SF) %if 0, they're not the same
or
SF(BFF ~= SF) %if not empty, these are the values that are different
John Vargas
2018년 8월 8일
John Vargas
2018년 8월 8일
Walter Roberson
2018년 8월 9일
>> max(BFF(:)-SF(:))
ans =
0.00204231
Perhaps you are encountering noticeable round-off error. If you entered data from a printed table, the table might not have shown all of the decimal places the data really had, and that can result in calculations not coming out as you expect them to.
답변 (1개)
Thorsten
2018년 8월 8일
0 개 추천
Maybe it helps if you transpose the matrix to get it right.
댓글 수: 4
John Vargas
2018년 8월 8일
Thorsten
2018년 8월 8일
If they are not equal, how large is the difference? Maybe it is just a few eps.
John Vargas
2018년 8월 9일
편집: John Vargas
2018년 8월 9일
Walter Roberson
2018년 8월 10일
As outsiders, we have no reason to expect that the two matrices should be the same.
>> max(BFF(:))
ans =
0.00204256
>> max(SF(:))
ans =
2.5e-07
>> min(BFF(:))
ans =
0
>> min(SF(:))
ans =
0
You can see from these values that it is pretty certain that there will be some point where the difference between the two exceeds 0.002, or roughly a factor of 8000 compared to the smaller matrix.
카테고리
도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
