Effacer les filtres
Effacer les filtres

Error: In an assignment A(I) = B, the number of elements in B and I must be the same.

1 vue (au cours des 30 derniers jours)
I know this is only part of a script, but its part of a function I am making and all of the variables dont have values. However, I can tell you that F, b, L, E, I, and a, are all SCALARS. THe only array is x (a 1X100 array).
while x(i) < L
y(i) = F*b/(6*L*E*I)* ((L/b)*(x(i)-a).^3 +...
(L^2 - b^2)*x(i) - x.^3);
i = i + 1;
end
If I need to post more info I can.

Réponse acceptée

the cyclist
the cyclist le 5 Déc 2012
I haven't looked closely, but it looks like your denominator is an array, because of the x.^3 term. So, on the right, you are dividing a scalar by an array, to get an array. That has a dimension mismatch with the left, which is a scalar.

Plus de réponses (0)

Catégories

En savoir plus sur Matrices and Arrays 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!

Translated by