フィルターのクリア

How do I reduce the number of columns in matrix?

9 ビュー (過去 30 日間)
Tunde Adubi
Tunde Adubi 2022 年 7 月 6 日
回答済み: Voss 2022 年 7 月 6 日
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)

採用された回答

Voss
Voss 2022 年 7 月 6 日
% 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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLine Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by