how to solve this error "Subscripted assignment dimension mismatch."
조회 수: 1 (최근 30일)
이전 댓글 표시
I tried looping through 231 samples of data but the error below occurs,
Subscripted assignment dimension mismatch.
Error in tvf_emd (line 132)
imf(nimf,:)=y(ind_remov_pad);
if flag_stopiter
for row_number = 1 : size(imf,1);
end
imf(nimf,:)=y(ind_remov_pad);
temp_x=temp_x - y(ind_remov_pad);
break;
each Imf is supposed to be 50x 500 but due to the 231 data samples , the imf matrix multiplies to become 50 x 115500.
This causes the above error even though I tried looping through each sample.
Please I will be grateful for any help.
댓글 수: 9
Guillaume
2019년 10월 15일
tvf_emd is a function, therefore you must be calling it from some other code (the same code that actually imports your data), maybe it's a script. The loop is in that other code. The function itself should be unmodified, e.g.
%script or function, NOT tvf_emd.m
matcontent = load('Total matrix data..mat')
DS_DATA_ODD = matcontent.DS_DATA_ODD;
out = zeros(50, size(DS_DATA_ODD, 2), size(DS_DATA_ODD, 1))
for row = 1:size(DS_DATA_ODD, 1)
out(:, :, row) = tvf_emd(DS_DATA_ODD(row, :));
end
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!