Azzera filtri
Azzera filtri

How do I reduce the number of columns in matrix?

9 visualizzazioni (ultimi 30 giorni)
Reduce the number of columns in a matrix variable (zh) and store in new variable (zhs) and retain class type.
zh = 600 X 416; double
becomes
zhs= 600 X 413; double
zhs(zh(600,416))=[];
figure('position',[50 100 1400 400]);
xtime= datenum(time(1:413,1));
x_t= datetime(xtime, 'ConvertFrom','datenum','Format','dd-MMM-uuuu HH:mm:ss');
pcolor(x_t,rng,zhs)

Risposta accettata

Voss
Voss il 6 Lug 2022
% zh = 600 X 416; double
columns_to_remove = [80 109 237]; % specify which columns will be removed from zhs
zhs = zh;
zhs(:,columns_to_remove) = []; % remove the columns
% zhs= 600 X 413; double

Più risposte (0)

Categorie

Scopri di più su Line Plots in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by