Help with graph plotting

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 个评论

Please share what a and b are.
a is 1*50 array and b is 50*50 array.

请先登录,再进行评论。

 采纳的回答

Matt J
Matt J 2022-3-7

1 个投票

Your a and b contain data for 2 lines.

3 个评论

a is 1*50 array and b is 50*50 array.
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.
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 个)

类别

帮助中心File 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