Borrar filtros
Borrar filtros

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

1 visualización (últimos 30 días)
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.

Respuesta aceptada

the cyclist
the cyclist el 5 de Dic. de 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.

Más respuestas (0)

Categorías

Más información sobre Matrices and Arrays en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by