Making a 1D array/vector from a table

조회 수: 20 (최근 30일)
Chris Dan
Chris Dan 2021년 1월 23일
편집: Ive J 2021년 1월 23일
Hello,
I have this table or a 2D array
I want to seperate the numbers from the first column which have zero values in the third column. So in the end my result would be
x = [0; 0.0242; 0.3403]
Does anyone knows how it can be done ?

채택된 답변

Ive J
Ive J 2021년 1월 23일
편집: Ive J 2021년 1월 23일
X = cell2mat(X_cell); % X_cell: your original cell
myVec = X(X(:, 3) == 0, 1);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by