How I separate a table if I need the corresponding values from 'D' and 'E' in diferents vectors
angle1 angle2 angle3 label --------- ----------- -------- ----------- -------- 111 90 50 'D' ... 321 80 50 'E' 121 70 50 'E' 222 70 50 'D' 333 80 50 'D'
I need obtain the vector for every colum depends of the label 'D' and 'E' for instance
angle1E = [321 121] angle1D = [111 222 333] angle2E = [80 70] angle2D = [90 70 80]
I tried first change the colum 4 in a categorical, and after this use a called in the colum all D but i dont understand well
close all;clearvars;clc;%% import data for angle
angle = readtable('angulos33.txt');%% Variable
A11 = angle(:,1); %%angle at 0 h
A22 = angle(:,2); %%angle at 24 h
A33 = angle(:,3); %% Angle at 48 h
A44 = angle(:,4); %%etiqueta interno "D" externo "E"
A44 = categorical(angle.Var4('D'))
Best Answer