there is an error in line 2 and I don't know why
function [y] = BeamElementStiffness(E,I,L,phi,kapa)
y = E*I/phi * [kapa*12/L^3 kapa*6/L^2 -kapa*12/L^3 kapa*6/L^2 ; kapa*6/L^2 (4*kapa+phi)/L -kapa*6/L^2 (2*kapa-phi)/L ; -kapa*12/L^3 -kapa*6/L^2 kapa*12/L^3 -kapa*6/L^2 ; kapa*6/L (2*kapa-phi)/L -kapa*6/L^2 (kapa4+phi)/L];
end

回答 (1 件)

Star Strider
Star Strider 2018 年 9 月 28 日

0 投票

It could be that you ran your function by clicking on the green Run arrow in the Editor. You need to define the function arguments in your workspace (preferably in a script), and then call your function in the same script.

カテゴリ

ヘルプ センター および File Exchange で Environment and Settings についてさらに検索

回答済み:

2018 年 9 月 28 日

Community Treasure Hunt

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

Start Hunting!

Translated by