not enough input arguments
显示 更早的评论
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
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 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!