Matrix Function to Finite Element Method
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Rafael Zanetti
am 17 Apr. 2020
Kommentiert: Ameer Hamza
am 18 Apr. 2020
Hi, I'm trying to create a function with matrix, but a heve not got, the results shall be k1 = [100 -100; -100 100], and my function have been that:
function y = SpringElementStiffness(k)
y = [k -k; -k k];
end
k1=SpringElementStiffness(100)
I Thank you by your attention.
0 Kommentare
Akzeptierte Antwort
Ameer Hamza
am 17 Apr. 2020
Create a file named SpringElementStiffness.m:
function y = SpringElementStiffness(k)
y = [k -k; -k k];
end
and then in the command window, run
>> k1=SpringElementStiffness(100)
k1 =
100 -100
-100 100
2 Kommentare
Weitere Antworten (0)
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!