how to convert cell to mat

조회 수: 4 (최근 30일)
ANUSAYA SWAIN
ANUSAYA SWAIN 2023년 3월 28일
댓글: KSSV 2023년 3월 28일
I have a cell array of size h=4X1. Inside it has 4 different matrices of size 32X64. How to convert it to matrix. I used htemp=cell2mat(h). Now the size is 128x64. After that i try to separate the real and imaginary parts of htemp using htempreal=zeros(128,64,2). then htempreal(:,:,1)=real(htemp) and htempreal(:,:,2)=imag(htemp). at this point it shows error unable to perform assignment because the size of the left side is 128 by 64 and the size of the right side is 32 by 64.

답변 (1개)

KSSV
KSSV 2023년 3월 28일
REad about real and imag
R = real(htemp);
C = imag(htemp) ;
  댓글 수: 4
ANUSAYA SWAIN
ANUSAYA SWAIN 2023년 3월 28일
Upto step htemp=cell2mat(h). the size is 128X64. once i go to next step it changes to 32X64. i dont understand why
KSSV
KSSV 2023년 3월 28일
May be you are overwrititng the variable.......we can only help on looking into your full code.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 RF Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by