Filter löschen
Filter löschen

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

1 Ansicht (letzte 30 Tage)
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.

Akzeptierte Antwort

the cyclist
the cyclist am 5 Dez. 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.

Weitere Antworten (0)

Kategorien

Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by