2d gaussian function

11 visualizaciones (últimos 30 días)
Lucy Sharpe
Lucy Sharpe el 25 de Feb. de 2021
Respondida: Mathieu NOE el 26 de Feb. de 2021
I'm trying to create a plot of a 2d gaussian from information from a depth camera. But the depth values come out as a 1x407040 matrix instead of 848x480 pixels as the camera is set to. How do I go about creating this plot?

Respuestas (1)

Mathieu NOE
Mathieu NOE el 26 de Feb. de 2021
hello Lucy
assuming your values are stored in A vector, use reshape to get the 848x480 pixels in matrix B :
B = reshape(A,848,480);
then you can use any of the 2D plot commands , like
imagesc(B)

Categorías

Más información sobre Line Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by