I have to evaluate al values of L into the matrix Kelemento, but it evaluates in a way I dont wanto to, it evaluates for all values of L in the first row of kelemento instead of evaluating all the matrix for each vale of L
E= 3000
I=1
L=[4;5;1.5;1.5]
kelemento=[12*E*I./L.^3 6*E*I./L.^2 -12*E*I./L.^3 6*E*I./L.^2;
6*E*I./L.^2 4*E*I./L -6*E*I./L.^2 2*E*I./L;
-12*E*I./L.^3 -6*E*I./L.^2 12*E*I./L.^3 -6*E*I./L.^2;
6*E*I./L.^2 2*E*I./L -6*E*I./L.^2 4*E*I./L]

 Respuesta aceptada

Matt J
Matt J el 1 de Jul. de 2021
Editada: Matt J el 1 de Jul. de 2021
E= 3000;
I=1;
L=reshape( [4;5;1.5;1.5] , 1,1, []);
kelemento=[12*E*I./L.^3 6*E*I./L.^2 -12*E*I./L.^3 6*E*I./L.^2;
6*E*I./L.^2 4*E*I./L -6*E*I./L.^2 2*E*I./L;
-12*E*I./L.^3 -6*E*I./L.^2 12*E*I./L.^3 -6*E*I./L.^2;
6*E*I./L.^2 2*E*I./L -6*E*I./L.^2 4*E*I./L];
whos kelemento
Name Size Bytes Class Attributes kelemento 4x4x4 512 double

1 comentario

Diego Núñez García
Diego Núñez García el 1 de Jul. de 2021
Thank you for your help, you gave me de clue, instead I needed
clear all
clc
E= 3000;
I=1;
L=reshape( [4;5;1.5;1.5] , 1,[],4);
kelemento=[12*E*I./L.^3 6*E*I./L.^2 -12*E*I./L.^3 6*E*I./L.^2;
6*E*I./L.^2 4*E*I./L -6*E*I./L.^2 2*E*I./L;
-12*E*I./L.^3 -6*E*I./L.^2 12*E*I./L.^3 -6*E*I./L.^2;
6*E*I./L.^2 2*E*I./L -6*E*I./L.^2 4*E*I./L];

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Green Vehicles en Centro de ayuda y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by