Calling function error in MAtlab

E=70e6
A= 0.004
L1=3.5
theta1=90
L2=4
theta2=0
L3=5.3151
theta3= atan(3.5/4)*180/pi
L4=L3
theta4=360-theta3
L5=4
theta5=0
L6=3.5
theta6=270
k1=PlaneTrussElementStiffness(E,A,L1,theta1)

4 commentaires

muhammad waseem
muhammad waseem le 31 Mai 2021
Error in below command
k1=PlaneTrussElementStiffness(E,A,L1,theta1)
muhammad waseem
muhammad waseem le 31 Mai 2021
please solve this problem
Walter Roberson
Walter Roberson le 31 Mai 2021
What you posted is fine. Perhaps there is a problem inside PlaneTrussElementStiffness which you did not post the code for.
Sulaymon Eshkabilov
Sulaymon Eshkabilov le 31 Mai 2021
can you post the produced err in the command window?

Connectez-vous pour commenter.

Réponses (1)

KSSV
KSSV le 31 Mai 2021

0 votes

I guess you have not downloaded/ copied the function PlaneTrussElementStiffness in your working folder. It is not an inbuilt function, it is a user written function. You need to download the function. The function is given below and taken from the link https://github.com/seevven/matlab_vision/blob/master/M-Files/PlaneTrussElementStiffness.m .
function y = PlaneTrussElementStiffness(E,A,L, theta)
%PlaneTrussElementStiffness This function returns the element
% stiffness matrix for a plane truss
% element with modulus of elasticity E,
% cross-sectional area A, length L, and
% angle theta (in degrees).
% The size of the element stiffness
% matrix is 4 x 4.
x = theta*pi/180;
C = cos(x);
S = sin(x);
y = E*A/L*[C*C C*S -C*C -C*S ; C*S S*S -C*S -S*S ;
-C*C -C*S C*C C*S ; -C*S -S*S C*S S*S];
end

Catégories

En savoir plus sur MATLAB dans Centre d'aide et File Exchange

Produits

Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by