Making a 1D array/vector from a table

14 次查看(过去 30 天)
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 中查找有关 Matrices and Arrays 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by