how to plot only non zero value of a slicing of a 3d matrix?

8 visualizaciones (últimos 30 días)
Hello everyone,
I am trying to slice a 3d array over the x direction, however, I would like to plot only nonzero values of every single slice.
Can someone help me with this plz?
Thank you in advance
code:
clear all
clc
a=randi(5,10,10,10)
slice(a,[1:10],[ ],[ ])

Respuesta aceptada

Matt J
Matt J el 24 de Mayo de 2022
a(~a)=nan;
plot(a(:,:))

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by