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

조회 수: 5 (최근 30일)
Rabih Sokhen
Rabih Sokhen 2022년 5월 24일
댓글: Rabih Sokhen 2022년 5월 24일
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],[ ],[ ])

채택된 답변

Matt J
Matt J 2022년 5월 24일
a(~a)=nan;
plot(a(:,:))

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by