필터 지우기
필터 지우기

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 CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by