Help with graph plotting

조회 수: 5 (최근 30일)
Amy Topaz
Amy Topaz 2022년 3월 7일
댓글: Amy Topaz 2022년 3월 8일
I am getting the below strange horizontal line starting from 0 to the other end while plotting a curve.
Any idea why would this be?
I am using plot function
plot(a,b);
  댓글 수: 2
Davide Masiello
Davide Masiello 2022년 3월 7일
Please share what a and b are.
Amy Topaz
Amy Topaz 2022년 3월 7일
a is 1*50 array and b is 50*50 array.

댓글을 달려면 로그인하십시오.

채택된 답변

Matt J
Matt J 2022년 3월 7일
Your a and b contain data for 2 lines.
  댓글 수: 3
Matt J
Matt J 2022년 3월 7일
편집: Matt J 2022년 3월 7일
If one of the column of b is zero, it would explain why you are getting horizontal line. Troubleshooting would be easier, though, if you would Run your code here in the forum (not on your local computer):
That way, we'd all have access to both code and data and see what it's doing.
Amy Topaz
Amy Topaz 2022년 3월 8일
Yes except the first column all other colums are 0. Can I append the final answer matrix to contain 50*1 array instead of 50*50?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by