Info
この質問は閉じられています。 編集または回答するには再度開いてください。
What is wrong with my coding?
1 回表示 (過去 30 日間)
古いコメントを表示
Enter the magnitude and the position of the loading factors lateral to the beam axis, including point loads, moments and uniformly distributed loads. The number of the loading factors of the each kind must be defined by a user interactively. The input data control must be implemented.
%%Q1b
clear;clc;
% Get the value of the point load acting on the beam along with its positions
npl = input('Enter the number of point loads acting on the beam');
n=0
while((n < npl))
p(n+1) =input('Enter the point load')
loc(n+1) = input('Enter the distance of point load from left end')
% Check if the point loads are present inside the beam
if (loc(n+1)>l)
sprintf(' The point load cannot be outside the span of beam')
loc(n+1) = input('Enter the distance of point load from left end')
end
n = n+1
end
% Get the value of the uniformly distributed loads acting on the beam along with its span
nud = input('Enter the number of uniformly distributed loads acting on the beam');
q=0
while((q < nud))
ud(q+1) =input('Enter the intensity of loading')
locud(q+1) = input('Enter the distance of start of udl from left end')
spanud(q+1) = input('Enter the span of udl')
q = q+1
end
1 件のコメント
回答 (0 件)
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!