Matrix Function to Finite Element Method
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Ameer Hamza
2020-4-17
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
更多回答(0 个)
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!