Assignment has more non-singleton rhs dimensions than non-singleton subscripts error

11 visualizaciones (últimos 30 días)
Hi everyone, I am running this for loop and I am getting the next message :Assignment has more non-singleton rhs dimensions than non-singleton subscripts. Could someone explain to me why? The goal in this exercise is to compute the H/V ratio for an incequake time series with a dimnesion of 721x6000.Thank you!!
mat1=zeros(721:length(EHV))
for i=1:length(ETB21)
EHV=(((ETB21N).^2)+((ETB21E).^2))/(((ETB21N).^2)+((ETB21E).^2)+((ETB21).^2));
mat1(i,:)=EHV
end
HVmn=mean(mat1,1);
plot(HVmn)

Respuestas (1)

Walter Roberson
Walter Roberson el 18 de Mzo. de 2019
mat1 = zeros(721, length(EHV));
Notice the comma instead of colon.

Categorías

Más información sobre Loops and Conditional Statements 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