필터 지우기
필터 지우기

How can I solve this issue?

조회 수: 3 (최근 30일)
RADWAN A F ZEYADI
RADWAN A F ZEYADI 2021년 11월 27일
편집: Image Analyst 2021년 11월 27일
Unable to perform assignment because the size of the left side is 153-by-1 and the size of the right side is 51-by-1-by-3.
I should run for loop 500 times.
d_pred=zeros(153*500);
ne=500
for i = 1 : ne
d_pred(:,i) = calcola_dati_pre_stack(Vpsim(:,i), Vssim(:,i), Rhosim(:,i), wavelet, ang);
end
  댓글 수: 3
RADWAN A F ZEYADI
RADWAN A F ZEYADI 2021년 11월 27일
편집: RADWAN A F ZEYADI 2021년 11월 27일
@Rik yes the output 51*1*3 because i am apllying an algorithm and i should run it at least 500 so iam confused however i have uploaded the functions so what i have to do
regards
DGM
DGM 2021년 11월 27일
편집: DGM 2021년 11월 27일
I think you might have attached the wrong file. calcola_dati_pre_stack() calls CMP_zoepprtiz(), which is not included. You included applico_RPM_II(), which does not appear to be needed by any of these calculations.
You also might want to make the usage example above complete enough that it can actually replicate the error. As it is, the preallocation is bogus and there are missing variables.
This may be as simple as fixing some indexing issues in the function files, or if nothing else, simply reshaping the output to be a vector.

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

채택된 답변

Image Analyst
Image Analyst 2021년 11월 27일
You can use squeeze() to get rid of the singleton dimension:
m = calcola_dati_pre_stack(Vpsim(:,i), Vssim(:,i), Rhosim(:,i), wavelet, ang);
% m is 51x1x3. Use squeeze to make it 51x3.
m = squeeze(m); % Now m is 51x3.
Now, what does each of the 3 columns of this new m represent? Is it OK if we just take all the columns and stack them on top of each other? Like
d_pred=zeros(153*500);
ne=500
for i = 1 : ne
m = calcola_dati_pre_stack(Vpsim(:,i), Vssim(:,i), Rhosim(:,i), wavelet, ang);
% m is 51x1x3. Use squeeze to make it 51x3.
m = squeeze(m); % Now m is 51x3.
% Turn m from 51x3 into 153x1 column vector by using (:),
% and assign to the i'th column of d_pred.
d_pred(:,i) = m(:);
end
  댓글 수: 2
RADWAN A F ZEYADI
RADWAN A F ZEYADI 2021년 11월 27일
@Image Analystthank you so much
Image Analyst
Image Analyst 2021년 11월 27일
편집: Image Analyst 2021년 11월 27일
OK, but I guess it didn't solve your problem since you haven't accepted my Answer. So what else is wrong with it?

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with Wavelet Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by