Help with graph plotting

8 visualizaciones (últimos 30 días)
Amy Topaz
Amy Topaz el 7 de Mzo. de 2022
Comentada: Amy Topaz el 8 de Mzo. de 2022
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 comentarios
Davide Masiello
Davide Masiello el 7 de Mzo. de 2022
Please share what a and b are.
Amy Topaz
Amy Topaz el 7 de Mzo. de 2022
a is 1*50 array and b is 50*50 array.

Iniciar sesión para comentar.

Respuesta aceptada

Matt J
Matt J el 7 de Mzo. de 2022
Your a and b contain data for 2 lines.
  3 comentarios
Matt J
Matt J el 7 de Mzo. de 2022
Editada: Matt J el 7 de Mzo. de 2022
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 el 8 de Mzo. de 2022
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?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by