how can i solve this ?

1 visualización (últimos 30 días)
RADWAN A F ZEYADI
RADWAN A F ZEYADI el 1 de Dic. de 2021
Comentada: RADWAN A F ZEYADI el 1 de Dic. de 2021
i am trying to compute predicted data in order to compare it with original one, the out put of the function that i use is 51*71*3
but when i compute the predicted data i got this error Index in position 2 exceeds array bounds (must not exceed 1)
this is the code, any suggestion please?
Swmean=, shmean= Phimean=51*1
[Vp, Vs, Rho]=applico_RPM_II([Swmean(:), shmean(:) Phimean(:)]);
Vp=reshape(Vp,size(Phimean));
Vs=reshape(Vs,size(Phimean));
Rho=reshape(Rho,size(Phimean));
for i =1:71
dpr(:,i,:)= calcola_dati_pre_stack(Vp(:,i), Vs(:,i), Rho(:,i), wavelet, ang);
end

Respuestas (2)

Jan
Jan el 1 de Dic. de 2021
Editada: Jan el 1 de Dic. de 2021
"Phimean=51*1" means, that this variable has the sie [51, 1]. After
Vp=reshape(Vp,size(Phimean));
Cp has the same size also.
If i==2 in trhe 2nd iteration of the for loop, the expression:
dpr(:,i,:)= calcola_dati_pre_stack(Vp(:,i), Vs(:,i), Rho(:,i), wavelet, ang);
% ^^^^^^^
tries to access Vp(:, 2), but the 2nd dimension of Vp is 1, because it has the size [51, 1]. This is the meaning of the error message.
I cannot predict, what you want to do instead.
You can identify such problems by using the debugger:
dbstop if error
Then start the function again. When it stops at the error, check the sizes of the variables.
  1 comentario
RADWAN A F ZEYADI
RADWAN A F ZEYADI el 1 de Dic. de 2021
hank you just i want to obtain 51*71*3 such as original data

Iniciar sesión para comentar.


RADWAN A F ZEYADI
RADWAN A F ZEYADI el 1 de Dic. de 2021
thank you just i want to obtain 51*71*3 such as original data

Categorías

Más información sobre Discrete Multiresolution Analysis en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by