How to make a global matrix
34 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am trying to make a global matrix out of these 4 matrices and then slim it down to the correct matrix for a stiffness problem.
close all
clear all
clc
E = 5.*10.^6;
v = .29;
A1 = 0.5;
A2 = 0.375;
A3 = 0.25;
A4 = 0.124;
%element 1
el1 = A1*E/30
a = [el1 0 -el1 0
0 0 0 0
-el1 0 el1 0
0 0 0 0]
%element 2
el2 = A2*E/31.6228
l1 = 0.948711;
m1 = 0.316146;
b = el2.*[l1^2 l1*m1 -l1^2 -l1*m1
l1*m1 m1^2 -l1*m1 -m1^2
-l1^2 -l1*m1 l1^2 l1*m1
-l1*m1 -m1^2 l1*m1 m1^2]
%element 3
el3 = A3*E/36.055
l2 = 0.832051;
m2 = 0.554699;
c = el3.*[l2^2 l2*m2 -l2^2 -l2*m2
l2*m2 m2^2 -l2*m2 -m2^2
-l2^2 -l2*m2 l2^2 l2*m2
-l2*m2 -m2^2 l2*m2 m2^2]
%element 4
el4 = A4.*E./42.4264
l3 = 0.707107;
m3 = 0.707107;
d = el4*[l3^2 l3*m3 -l3^2 -l3*m3
l3*m3 m3^2 -l3*m3 -m3^2
-l3^2 -l3*m3 l3^2 l3*m3
-l3*m3 -m3^2 l3*m3 m3^2]
%global system
3 Kommentare
William Rose
am 18 Sep. 2022
@Robert Fields, you can create a 4x4 or 6x6 array and populate it with the elements you want from the 4x4x4 array.
e1=zeros(4,4); e2=zeros(6,6);
and so on. If all you really want is a 4x4 or 6x6 array made of selected elements of a, b, c, d, then I don't see the advantage of combing a,b,c,d into one 3D array. But I'm sure there's a reason...
Antworten (1)
Siehe auch
Kategorien
Mehr zu Logical 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!