relationship between 2 matrix

조회 수: 1 (최근 30일)
ha ha
ha ha 2018년 4월 13일
답변: Matt J 2018년 4월 13일
A, B is matrix:
A=[1;2;3;4;5;6;7;8;9];
B=[2;4;7;9];
How to find matrix C as follow?
C=[1;[];3;[];5;6;[];8;[]];%the location of matrix B from A will be replaced by [] value

채택된 답변

Matt J
Matt J 2018년 4월 13일

추가 답변 (1개)

Matt J
Matt J 2018년 4월 13일
If you mean that [] actually must reside in those spots, it can only be done with a cell array
C=num2cell(A);
C(B)={[]}

카테고리

Help CenterFile Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by