Assignment has more non-singleton rhs dimensions than non-singleton subscripts error
11 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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)
0 commentaires
Réponses (1)
Walter Roberson
le 18 Mar 2019
mat1 = zeros(721, length(EHV));
Notice the comma instead of colon.
0 commentaires
Voir également
Catégories
En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!