필터 지우기
필터 지우기

Printing Certain Number from a Vector

조회 수: 7 (최근 30일)
Faris Amzar Mohamad Azrai
Faris Amzar Mohamad Azrai 2020년 6월 4일
댓글: Stephen23 2020년 6월 4일
Hello, can anyone help me? I want to print the numbers which is not 0 from this vector using fprintf. So, basically, i want to print out the numbers 1 and 10 in one line and in a vector form in the statement.
vector = [0 0 0 1 10];
fprintf(....)

채택된 답변

KSSV
KSSV 2020년 6월 4일
disp(vector(vector~=0))

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by