필터 지우기
필터 지우기

to access the elements in the page wise of multidimensional matrix

조회 수: 1 (최근 30일)
ABDUL
ABDUL 2018년 2월 8일
댓글: ABDUL 2018년 2월 9일
my input data is
ofdm_symbol=randn(8,10,2)+(1j*randn(8,10,2))
i have to access the of the input part by part and do zero padding for the input data i am using this data in for loop
ii=2
time_domain_signal(:,:,ii)=abs(ifft([ofdm_symbol(:,1:4,ii) zeros(N,(L-1)*N,ii) ofdm_symbol(:,5:8,ii)]));
i am able access the elemnts of the 1st page but not able to access and assign them to the output. i am getting the error as
"Subscripted assignment dimension mismatch".
size(ofdm_symbol(:,1:4,ii))= 8x4 ;size(ofdm_symbol(:,5:8,ii)])=8x4 ,size(zeros(N,(L-1)*N,ii))=8x4
if i am using the parse of the code.
if i modify the code as
time_domain_signal=abs(ifft([ofdm_symbol(:,1:4,ii) zeros(N,(L-1)*N,ii) ofdm_symbol(:,5:8,ii)]));
my dimensions are
size(ofdm_symbol(:,1:4,ii))= 8x4 ;size(ofdm_symbol(:,5:8,ii)])=8x4 ,size(zeros(N,(L-1)*N,ii))=8x4x2
can any one help in obtaining the proper dimensions and accessing the elements page wise of multidimensional matrix
  댓글 수: 2
Matt J
Matt J 2018년 2월 8일
How are you pre-allocating time_domain_signal(:,:,:)
ABDUL
ABDUL 2018년 2월 8일
i am not pre allocating the time_domain_signal.. i am directly allocating the computed values to the time_domain_signal

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

답변 (1개)

Walter Roberson
Walter Roberson 2018년 2월 8일
As I indicated before, you should not be passing ii into zeros(), you should be passing length(ii)
  댓글 수: 1
ABDUL
ABDUL 2018년 2월 9일
if i am using the length(ii) then i am able access the elements of the second page but i need to access the elements page by page in the multidimensional array.

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by