Home > front end >  How to get particular data from column of table in MATLAB
How to get particular data from column of table in MATLAB

Time:01-01

i have this type of table. which is in the below image.

this is the image of table

now I need only the row where this "LBNP:30" type of data is available in last column. please help. I am new to MATLAB.

i need this type of output. please help. OUTPUT

CodePudding user response:

I've prepared a similar xlsx-file and next read it with readtable function

T = readtable('test.xlsx','ReadVariableNames',false)

You can see the example

Then you can make logical array with detecting rows you need:

idx = ismember(T.Var5,'LBNP:30')

And next just select these rows:

T(idx,:)

The result

CodePudding user response:

T = readtable('data.csv')

this line gives the below output. This is the output of the above line

then write this below code.

X = cellfun(@isempty,T.Var5);
T(X,:)= []

This is the output of this above two lines

  • Related