Borrar filtros
Borrar filtros

why i get error?

2 visualizaciones (últimos 30 días)
razzz
razzz el 1 de En. de 2014
Respondida: Image Analyst el 1 de En. de 2014
M_0=1;
EI=1;
fi=-pi:pi/300:pi;
C5=M_0/(2*EI);
gama=exp(i*fi);
delta_0=4+2*cos(fi);
C_2= [0 ;
-C5*L*gama./delta_0;
C5*(2*gama+1)./delta_0;
-C5*(gama+1)./(L*delta_0)];
I GET:
??? Error using ==> vertcat
CAT arguments dimensions are not consistent.
Error in ==> intgration_for_v_for_loop_chek at 47
C_2= [0 ;

Respuesta aceptada

Wayne King
Wayne King el 1 de En. de 2014
Editada: Wayne King el 1 de En. de 2014
Is this what you want?
M_0=1;
L = 1;
EI=1;
fi=-pi:pi/300:pi;
C5=M_0/(2*EI);
gama=exp(i*fi);
delta_0=4+2*cos(fi);
C_2= [zeros(size(delta_0)) ;
-C5*L*gama./delta_0;
C5*(2*gama+1)./delta_0;
-C5*(gama+1)./(L*delta_0)];
You did not tell us what L was, so I just used 1.

Más respuestas (1)

Image Analyst
Image Analyst el 1 de En. de 2014
In the first row you have only a single zero 0. But the second row, -C5*L*gama./delta_0, has as many elements as gama, which has as many elements as fi, which is 601. You can't have 1 element in row 1 and 601 elements in rows 2, 3, and 4. To fix, use as many elements in row 1 as the other rows, like Wayne showed you.

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