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 个评论
Yussif M. Awelisah
Yussif M. Awelisah 2019-10-15
please I do not understand exactly what the above statement means. Please in that case will my input value be the same as M ?
Please I wish you can help further?
Guillaume
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 CenterFile Exchange 中查找有关 Loops and Conditional Statements 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by